cf/mirror

Optimal Partition

CF
1667B2100· master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
3
1 2 -3
4
0 -2 3 -4
5
-1 -2 3 -1 -1
6
-1 2 -3 4 -5 6
7
1 -1 -1 1 -1 -1 1
Output
1
2
1
6
-1
1667B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)