U E D R , A S I H C RSS

Random Walk2/Test Case

Case 1

Input
~cpp 
5 5
0 0
22224444346
999

Output
~cpp 
11

2 1 1 1 1 
1 0 0 0 2 
0 0 0 0 1 
0 0 0 0 1 
0 0 0 0 1 

Case 2

Input
~cpp 
5 5
0 0
222224
999

Output
~cpp 
6

2 1 1 1 1 
1 0 0 0 0 
0 0 0 0 0 
0 0 0 0 0 
0 0 0 0 0 

Case 3

Input
~cpp 
5 5
0 0
44444444444444444444
999

Output
~cpp 
20

5 0 0 0 0 
4 0 0 0 0 
4 0 0 0 0 
4 0 0 0 0 
4 0 0 0 0 

Case 4

Input
~cpp 
3 3
0 0
44220064
999

Output
~cpp 
8

1 1 1 
1 1 1 
1 1 1 


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:27:50
Processing time 0.0143 sec