cf/mirror

Thematic Contests

CF
1077E1800· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
18
2 1 2 10 2 10 10 2 2 1 10 10 10 10 1 1 10 10
Output
14
Sample 2of 3
Input
10
6 6 6 3 6 1000000000 3 3 6 6
Output
9
Sample 3of 3
Input
3
1337 1337 1337
Output
3
1077E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)