cf/mirror

Yet Another Sorting Problem

CF
1585D1900· candidate master2s256 MB⌨ stdin/stdout

Examples

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