cf/mirror

Beautiful Sequence

CF
1810A800· newbie1s256 MB⌨ stdin/stdout

Examples

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