cf/mirror

The hat

CF
1019B2000· candidate master1s256 MB⇄ interactive

Examples

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