cf/mirror

DFS Checker (Easy Version)

CF
2002D11900· candidate master2s512 MB⌨ stdin/stdout

Examples

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