cf/mirror

Lost Permutation

CF
1759B800· newbie1s256 MB⌨ stdin/stdout
#math

Examples

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