cf/mirror

Valid Bitonic Permutations

CF
1763D2200· master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
3 1 3 2 3
3 2 3 3 2
4 3 4 3 1
5 2 5 2 4
5 3 4 5 4
9 3 7 8 6
20 6 15 8 17
Output
0
1
1
1
3
0
4788
1763D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)