cf/mirror

Lost Civilization (Hard Version)

CF
2201A21700· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
5
1 2 3 4 5
5
1 3 5 7 9
5
1 2 5 6 5
7
1 2 4 5 3 7 8
9
9 8 9 2 3 4 4 5 3
Output
15
35
25
60
78
2201A2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)