cf/mirror

Destroying Towers

CF
2237A800· newbie1s256 MB⌨ stdin/stdout

Examples

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