cf/mirror

Array and Permutation

CF
2197B1100· newbie1.5s256 MB⌨ stdin/stdout

Examples

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