#P1263. [CEOI 2002] Royal guards
[CEOI 2002] Royal guards
Output Format
This problem uses Special Judge.
First output a single integer , the maximum number of guards that can be placed.
Then output lines. Each line contains two integers , indicating that a guard is placed at row and column .
3 4
2 0 0 0
2 2 2 1
0 1 0 2
2
1 2
3 3
Hint
Explanation for sample input and output 1:
As shown in the figure (black cells are walls, white cells are empty, circles are traps, and G denotes a guard).

Constraints:
For all testdata, it is guaranteed that and .
Translated by ChatGPT 5
京公网安备 11011102002149号