cf/mirror

Diadrash (Hard Version)

CF
2163D22500· grandmaster3s256 MB⇄ interactive

Examples

Sample 1of 1
Input
3
4 3
1 2
2 4
1 3
 
2
 
0
 
1
 
4
 
6 6
1 2
2 4
3 3
4 6
5 5
6 6
 
6
 
1
 
2
 
4 4
1 1
2 2
3 3
4 4
Output
? 1 3
 
? 4 4
 
? 1 1
 
? 1 4
 
! 2
 
 
 
 
 
 
 
? 1 6
 
? 3 3
 
? 2 4
 
! 2
 
 
 
 
 
! 1
2163D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)