cf/mirror

Subsequence Addition (Hard Version)

CF
1807G21100· newbie2s256 MB⌨ stdin/stdout

Examples

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