cf/mirror

Pashmak and Parmida's problem

CF
459D1800· expert3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
7
1 2 1 1 2 2 1
Output
8
Sample 2of 3
Input
3
1 1 1
Output
1
Sample 3of 3
Input
5
1 2 3 4 5
Output
0
459D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)