Median of Stream of Running integers.Help needed in debugging

My code is failing all the test cases but when i run it on my local IDE it is showing correct output. Could you please tell me where i am going wrong?

please let me debugg it

Print only the integer part of the median.
so no need to print it in form of double just use int to display the output

passed all test cases check this out