cf/mirror

The Struggling Contestant

CF
1450F2400· grandmaster1s256 MB⌨ stdin/stdout

Examples

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