cf/mirror

Ramesses and Corner Inversion

CF
1119C1500· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3 3
0 1 0
0 1 0
1 0 0
1 0 0
1 0 0
1 0 0
Output
Yes
Sample 2of 3
Input
6 7
0 0 1 1 0 0 1
0 1 0 0 1 0 1
0 0 0 1 0 0 1
1 0 1 0 1 0 0
0 1 0 0 1 0 1
0 1 0 1 0 0 1
1 1 0 1 0 1 1
0 1 1 0 1 0 0
1 1 0 1 0 0 1
1 0 1 0 0 1 0
0 1 1 0 1 0 0
0 1 1 1 1 0 1
Output
Yes
Sample 3of 3
Input
3 4
0 1 0 1
1 0 1 0
0 1 0 1
1 1 1 1
1 1 1 1
1 1 1 1
Output
No
1119C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)