cf/mirror

Grand Finale: Snakes

CF
2159F3500· legendary gm4s512 MB⇄ interactive

Examples

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