2159: 猫鼠大战
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
Input
第一行包含 1 个整数 n,之后 n 行,由 和 组成的 的方阵。
方阵内只有一个闭合圈,圈内至少有一个 0 。
Output
改写好数字 的 n*n 的完整方阵。
Sample Input Copy
6
0 1 1 1 1 1
0 1 0 0 0 1
0 1 1 0 0 1
1 1 0 1 0 1
1 0 0 0 0 1
1 1 1 1 1 0
Sample Output Copy
0 1 1 1 1 1
0 1 2 2 2 1
0 1 1 2 2 1
1 1 2 1 2 1
1 2 2 2 2 1
1 1 1 1 1 0
HINT
1<n<=30