GETTING error Median in a stream of running integers

why my ans is wrong though code is correct according to me .
please tell me what mistake i am doing here
question- median of integer in running medium
my solution - https://ide.codingblocks.com/s/118184

according to your code
input
5 15 1 3 2 8 5
Output
5 10 5 4 3 4 5
which is correct
when input is 5->5
5 15-> (5+15)/2=10
1 5 15 -> 5
1 3 5 15-> (3+5)/2=4
and so on…

@Saurabh2 what’s wrong with my code
??