The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.
Public test cases
Input
0 0 1
4
0 0 1 3
0 3 1 2
0 6 1 1
0 9 1 1
Output
(0, 0) HIT
(0, 3) HIT
(0, 6) HIT
(0, 9) NOT HIT
Input
0 0 1
4
0 0 1 3
0 3 1 2
0 6 1 1
0 9 1 1
Output
(0, 0) HIT
(0, 3) HIT
(0, 6) HIT
(0, 9) NOT HIT
Input
10 10 1
4
10 13 1 3
13 10 2 3
10 7 1 3
7 10 2 3
Output
(10, 13) NOT HIT
(13, 10) HIT
(10, 7) NOT HIT
(7, 10) HIT
Input
10 10 1
4
10 13 1 3
13 10 2 3
10 7 1 3
7 10 2 3
Output
(10, 13) NOT HIT
(13, 10) HIT
(10, 7) NOT HIT
(7, 10) HIT