cf/mirror

The Number of Subpermutations

CF
1175F2500· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
8
2 4 1 3 4 2 1 2
Output
7
Sample 2of 2
Input
5
1 1 2 1 2
Output
6
1175F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)