cf/mirror

Mukhammadali and the Smooth Array

CF
2167G1600· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
10
1
10
5
4
1 2 2 3
5 6 7 8
4
4 3 2 1
1 1 1 1
3
3 1 2
100 1 1
5
5 5 5 5 5
10 1 10 1 10
5
1 3 2 2 4
100 1 1 1 100
6
10 9 8 7 6 5
1 100 1 100 1 100
5
100 1 100 100 100
1 100 1 1 1
4
2 1 2 1
5 4 3 2
7
1 5 3 4 2 6 7
10 1 10 1 10 1 10
Output
0
0
3
2
0
1
203
1
6
11
2167G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)