cf/mirror

Tree Queries

CF
1328E1900· candidate master2s256 MB⌨ stdin/stdout

Examples

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