cf/mirror

Interactive Graph (Hard Version)

CF
2196C22000· candidate master2s256 MB⇄ interactive

Examples

Sample 1of 1
Input
3
5
 
1 1
 
2 1 2
 
3 1 2 4
 
3 1 2 5
 
2 1 3
 
3 1 3 4
 
3 1 3 5
 
1 2
 
1 3
 
1 4
 
1 5
 
1
 
0
 
2
 
1 1
 
1 2
 
2 2 1
Output
? 1
 
? 2
 
? 3
 
? 4
 
? 5
 
? 6
 
? 7
 
? 8
 
? 11
 
? 14
 
? 15
 
! 6
1 3
1 2
2 4
3 4
2 5
3 5
 
? 2
 
! 0
 
? 1
 
? 2
 
? 3
 
! 1
2 1
2196C2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…