Minimize Permutation Subarrays
1838B1100· newbie2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1multi-test • hover to link
Input
831 2 331 3 251 3 2 5 464 5 6 1 2 398 7 6 3 2 1 4 5 9107 10 5 1 9 8 3 2 6 4108 5 10 9 2 1 3 4 6 7102 3 5 7 10 1 8 6 4 9
Output
2 31 15 21 49 58 86 105 4
58%
1838B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)