Hello.
I think there are some serious issues with the testcases provided in TLG.
The input instruction says :
" The first line of the input will contain a single integer N (N ≤ 10000) indicating the number of rounds in the game. Lines 2,3,…,N+1 describe the scores of the two players in the N rounds. Line i+1 contains two integer Si and Ti, the scores of the Player 1 and 2 respectively, in round i. You may assume that 1 ≤ Si ≤ 1000 and 1 ≤ Ti ≤ 1000. "
Because of the constraints i added something like this to my code,
if(N > 10000) || if(Si < 1 || Si > 1000) || if(Ti < 1 || Ti > 1000) then Exit(0);
But the compiler kept rejecting my answer returning WA. I couldn’t understand what was going on and then after wasting a whole day’s time when i came across link text comment by @beroul i took the test case but it gave nothing as in last line score of p2 is zero.
Afterwards, just to try my luck i removed all the input constraints from my code and it works just fine. Are we not supposed to check whether an input meets the declared constraints or not? If so, what the above quote means and how a testcase that doesnot follow the instructions was given? Or maybe i am mis-understanding something. Please point it out to me.
Any answer is much appreciated. Thank you for your time.