cf/mirror

Arrange the Numbers in a Circle

CF
2230C1300· pupil2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
11
4
1 1 1 3
3
2 3 4
6
1 1 1 1 3 4
3
1000000000 1000000000 1000000000
3
1 1 2
1
2
2
2 2
3
1 1 1
4
1 1 2 2
3
1 1 4
9
1 1 1 1 1 1 1 1 7
Output
4
9
8
3000000000
3
0
4
0
4
6
10
2230C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)