cf/mirror

Rudolph and Mimic

CF
1846F1800· expert1s256 MB⇄ interactive

Examples

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