cf/mirror

Animals and Puzzle

CF
713D2700· international gm5s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3 4
1 1 0 1
0 1 1 0
0 1 1 0
5
1 1 2 3
2 1 3 2
3 2 3 4
1 1 3 4
1 2 3 4
Output
1
1
1
2
2
713D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)