Importance of time


it works correctly for sample test case, but gives wrong answer when I submit

@dhairya16 It was probably due to freopen() and you missed one case which I added.
You can have alook at this code .https://ide.codingblocks.com/s/244402

@amankumarkeshu ok, thank you

If your doubt is resolved please close this doubt