cf/mirror

Kirill and Mushrooms

CF
1945F1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
3
9 8 14
3 2 1
5
1 2 3 4 5
1 2 3 4 5
6
1 2 3 4 5 6
6 5 4 3 2 1
5
1 4 6 10 10
2 1 4 5 3
4
2 2 5 5
4 2 3 1
5
1 2 9 10 10
1 4 2 3 5
Output
16 2
9 3
8 2
20 2
5 1
20 2
1945F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)