i177. 小畫家 (Painter)
Tags :
Accepted rate : 84人/112人 ( 75% ) [非即時]

Content

Input

$\color{black}{1≤ H, W ≤ 500}$

$\color{black}{1 ≤ S_i ≤ H}$

$\color{black}{1 ≤ S_j ≤ W}$

$\color{black}{0 ≤ Z ≤ 99}$

$\color{black}{0 ≤ C_{ij} ≤ 99}$

Output

Sample Input #1
1 5 1 3 3
1 0 0 0 1
Sample Output #1
1 3 3 3 1
Sample Input #2
5 6 3 2 4
2 2 2 2 0 0
2 1 0 0 2 0
2 0 1 3 2 0
2 0 0 0 2 0
2 2 2 2 2 0
Sample Output #2
2 2 2 2 0 0
2 1 0 0 2 0
2 4 1 3 2 0
2 4 4 4 2 0
2 2 2 2 2 0
Sample Input #3
4 5 1 2 1
2 2 2 2 2
2 2 2 2 2
2 2 2 2 2
2 2 2 2 2
Sample Output #3
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
Sample Input #4
6 8 3 4 2
1 0 0 1 0 0 3 0
0 0 3 2 0 0 3 2
0 0 2 3 3 3 3 0
0 0 3 3 3 3 0 0
0 0 3 0 0 3 3 3
3 3 0 0 0 0 0 0
Sample Output #4
1 0 0 1 0 0 2 0
0 0 3 2 0 0 2 2
0 0 2 2 2 2 2 0
0 0 2 2 2 2 0 0
0 0 2 0 0 2 2 2
3 3 0 0 0 0 0 0

Hint ：

https://zh.wikipedia.org/wiki/%E5%A0%86%E7%96%8A%E6%BA%A2%E4%BD%8D

Tags:

[管理者： linlincaleb@...(臨末之頌) ]

 ID User Problem Subject Hit Post Date 沒有發現任何「解題報告」