I am trying to solve problem : http://codeforces.net/contest/54/problem/C I am getting wrong answer on test case no 51. Despite trying for a long time, I am unable to get where I am getting wrong.
My code outputs on this test : -1.#IND00000000000000 , which is quite strange. Link to my solution : http://codeforces.net/contest/54/submission/2789163
Thanks in advance .
EDIT: problem is solved. Problem was in size in declared array . Wasted a lot of time in debugging the solution rather than looking at it. :(