Median in a stream of running integers

Getting wrong answer.
https://ide.codingblocks.com/s/224604