cf/mirror

Baudelaire (hard version)

CF
2106G22500· grandmaster3s256 MB⇄ interactive

Examples

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