cf/mirror

Penchick and Even Medians

CF
2031F2800· international gm3s256 MB⇄ interactive

Examples

Sample 1of 1
Input
2
6
 
3 4
 
3 4
 
2 3
 
10
 
3 4
 
6 7
Output
? 6 1 2 3 4 5 6
 
? 4 3 6 1 5
 
? 4 3 6 2 5
 
! 3 6
 
? 6 1 3 7 8 9 10
 
? 8 1 2 3 4 5 6 7 8
 
! 6 5
2031F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)