I enjoyed the recent test division 3 contest! However, test case 7 was illegal. In the constraints of the problem, x and y had to have a positive absolute value. However, test case 7 was:
1 20 -3 3 -3 -3 -3 1 -4 -3 -4 3 3 -9 3 -3 1 -9 -6 1 3 1 20 -6 9 0 -9 .....
The second query caused my solution and many others to fail :( Could someone take a look into this?