cf/mirror

Great Grids

CF
1844E2400· grandmaster1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
3 4 4
1 1 2 2
2 1 3 2
1 4 2 3
2 3 3 2
2 7 2
1 1 2 2
1 2 2 1
8 5 4
1 2 2 1
1 5 2 4
7 1 8 2
7 4 8 5
8 5 4
1 2 2 1
1 5 2 4
7 1 8 2
7 5 8 4
Output
YES
NO
YES
NO
1844E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…