cf/mirror

Intersection of Permutations

CF
1093E2400· grandmaster6s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6 7
5 1 4 2 3 6
2 5 3 1 4 6
1 1 2 4 5
2 2 4
1 1 2 4 5
1 2 3 3 5
1 1 6 1 2
2 4 1
1 4 4 1 3
Output
1
1
1
2
0
1093E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)