What is wrong with my solution for Round #350 (Div. 2) B

Revision en1, by toss, 2016-05-06 03:18:53

Here is my submission:

http://mirror.codeforces.com/contest/670/submission/17734251

I get a RUNTIME_ERROR for the 13th test case and I have no idea why. I cannot debug it, since the input is truncated. I tried to reproduce a test case with similar n and k, but random id's and it is working fine, or at least it doesn't cause a runtime error.

I hope that such questions are appropriate for the blog and I would very much appreciate your help. I would also be very happy if you could give me some general tips on how to approach such problems (figuring out why a truncated input caused a runtime error).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English toss 2016-05-06 03:18:53 663 Initial revision (published)