Why I am getting TLE ?
Median in a running stream of numbers
why you use this condition
cin >> d;
while(d != -1)
{
in question you have given n no of element
only that much element you have to take
mistakes
-
use int instead of float in question it is not mention to print nos in float
also divide by 2 not 2.0 -
print endl after each testcase