cf/mirror

Minimize Permutation Subarrays

CF
1838B1100· newbie2s256 MB⌨ stdin/stdout

Examples

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