cf/mirror

Round Dance

CF
1833E1600· expert2s256 MB⌨ stdin/stdout

Examples

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