cf/mirror

Cat, Fox and Maximum Array Split

CF
1973D2400· grandmaster3s256 MB⇄ interactive

Examples

Sample 1of 1
Input
3
1 1
 
1
2 2
 
1
 
3
 
1
6 3
 
7
 
2
 
3
 
6
 
1
Output
! 1
 
 
? 1 1
 
? 2 1
 
! -1
 
 
? 1 9
 
? 1 6
 
? 3 6
 
? 4 6
 
! 6
1973D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)