cf/mirror

Array Optimization by Deque

CF
1579E21700· expert2s256 MB⌨ stdin/stdout

Examples

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