cf/mirror

Monsters

CF
1810E2100· master2s256 MB⌨ stdin/stdout

Examples

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