cf/mirror

Close Tuples (hard version)

CF
1462E21700· expert4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
4 3 2
1 2 4 3
4 2 1
1 1 1 1
1 1 1
1
10 4 3
5 6 1 3 2 9 8 1 2 4
Output
2
6
1
20
1462E2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)