cf/mirror

Shinju and the Lost Permutation

CF
1658C1700· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6
1
1
2
1 2
2
2 2
6
1 2 4 6 3 5
6
2 3 1 2 3 4
3
3 2 1
Output
YES
YES
NO
NO
YES
NO
1658C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)