cf/mirror

Karen and Game

CF
815A1700· expert2s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3 5
2 2 2 3 2
0 0 0 1 0
1 1 1 2 1
Output
4
row 1
row 1
col 4
row 3
Sample 2of 3
Input
3 3
0 0 0
0 1 0
0 0 0
Output
-1
Sample 3of 3
Input
3 3
1 1 1
1 1 1
1 1 1
Output
3
row 1
row 2
row 3
815A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)