cf/mirror

Tree Queries (Hard Version)

CF
1695D22300· international master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
1
2
1 2
10
2 4
2 1
5 7
3 10
8 6
6 1
1 3
4 7
9 6
Output
0
1
2
1695D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…