cf/mirror

Inverse Minimum Partition (Hard Version)

CF
2159D23200· legendary gm4s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
5
3 1 4 1 5
10
9 2 6 5 3 5 8 9 7 9
8
1 2 3 4 5 6 7 8
2
1 1000000000000000000
Output
21
124
84
4
2159D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)