cf/mirror

Almost Arithmetic Progression

CF
978D1500· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
4
24 21 14 10
Output
3
Sample 2of 4
Input
2
500 500
Output
0
Sample 3of 4
Input
3
14 5 1
Output
-1
Sample 4of 4
Input
5
1 3 6 9 12
Output
1
978D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)