cf/mirror

Stepan and Permutation

CF
2244C2s256 MB⌨ stdin/stdout

Examples

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