Intersection of Permutations
1093E2400· grandmaster6s512 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
6 75 1 4 2 3 62 5 3 1 4 61 1 2 4 52 2 41 1 2 4 51 2 3 3 51 1 6 1 22 4 11 4 4 1 3
Output
11120
58%
1093E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)