I tested you code and couldn’t find any test case where it gave the wrong answer. So I submitted it, and it gets NZEC, not WA
Looking at my own solution to this problem, I see that I believed the input is malformed, and so coded a solution that just read the required number of integers without worrying whether they were laid out in the format as specified in the problem.
edit: And reading the comments, many others also believe the input is malformed.