Yet Another Array Partitioning Task
1114B1500· specialist2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
9 2 35 2 5 2 4 1 1 3 2
Output
213 5
Sample 2of 3
Input
6 1 44 1 3 2 2 3
Output
121 3 5
Sample 3of 3
Input
2 1 2-1000000000 1000000000
Output
01
58%
1114B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)