Not passing any test case. What is the error
Median in stream of running integers
instead of float use int
it is not mention in question to print ans in float so we use integer
Modified Code
i hope this helps
if yes hit a like and donβt forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask
1 Like
One optimisation could be taking minheapsize=0 , maxheapsize=0 and adjusting the size during operation it will reduce the time of calculating minheap.size() . Even I faced the same problem. The editorial code itself gives TLE in those 2 test cases.But the code works perfectly fine in hackerblocks without TLE . Hope the technical person resolves the issue soon.
Still if you want to clear the question use these lines inside main()
ios_base::sync_with_stdio(false);
cin.tie(NULL);