The Number of Subpermutations
1175F2500· grandmaster2s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
82 4 1 3 4 2 1 2
Output
7
Sample 2of 2
Input
51 1 2 1 2
Output
6
58%
1175F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
82 4 1 3 4 2 1 2
7
51 1 2 1 2
6