cf/mirror

Yet Another Problem On a Subsequence

CF
1000D1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
2 1 1
Output
2
Sample 2of 2
Input
4
1 1 1 1
Output
7
1000D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)