cf/mirror

Paths in a Tree

CF
2193G2100· master4s256 MB⇄ interactive

Examples

Sample 1of 1
Input
3
 
2
1 2
 
1
 
 
3
1 2
1 3
 
0
 
0
 
 
4
1 2
2 3
2 4
 
0
 
1
Output
? 1 1
 
! 1
 
 
? 1 1
 
? 2 2
 
! 3
 
 
? 1 3
 
? 4 4
 
! 4
2193G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…