cf/mirror

K-Sort

CF
1987B1000· newbie1s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 1multi-test • hover to link
Input
5
3
1 7 9
5
2 1 4 7 6
4
1 3 2 4
1
179
9
344 12 37 60 311 613 365 328 675
Output
0
3
2
0
1821
1987B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)