cf/mirror

Lost Nodes

CF
1534H3500· legendary gm4s256 MB⇄ interactive

Examples

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