cf/mirror

Permutation Graph

CF
1696D1900· candidate master2s512 MB⌨ stdin/stdout

Examples

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