cf/mirror

Non-equal Neighbours

CF
1585F2400· grandmaster3s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
2 2 2
Output
2
Sample 2of 3
Input
2
2 3
Output
4
Sample 3of 3
Input
3
1 1 1
Output
0
1585F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)