Non-Decreasing Dilemma
1567E2200· master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
5 63 1 4 1 52 2 52 1 31 4 42 2 51 2 62 2 5
Output
64107
58%
1567E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
5 63 1 4 1 52 2 52 1 31 4 42 2 51 2 62 2 5
64107