Ramesses and Corner Inversion
1119C1500· specialist1s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
3 30 1 00 1 01 0 01 0 01 0 01 0 0
Output
Yes
Sample 2of 3
Input
6 70 0 1 1 0 0 10 1 0 0 1 0 10 0 0 1 0 0 11 0 1 0 1 0 00 1 0 0 1 0 10 1 0 1 0 0 11 1 0 1 0 1 10 1 1 0 1 0 01 1 0 1 0 0 11 0 1 0 0 1 00 1 1 0 1 0 00 1 1 1 1 0 1
Output
Yes
Sample 3of 3
Input
3 40 1 0 11 0 1 00 1 0 11 1 1 11 1 1 11 1 1 1
Output
No
58%
1119C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)