cf/mirror

Yet Another Array Partitioning Task

CF
1114B1500· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
9 2 3
5 2 5 2 4 1 1 3 2
Output
21
3 5
Sample 2of 3
Input
6 1 4
4 1 3 2 2 3
Output
12
1 3 5
Sample 3of 3
Input
2 1 2
-1000000000 1000000000
Output
0
1
1114B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)