#P1410. 子序列
子序列
Description
Given a sequence of length (where is even), determine whether it can be partitioned into two strictly increasing subsequences, each of length .
Input Format
Multiple lines, each line represents one set of testdata.
For each set of testdata, first input an integer , the length of the sequence. Then integers follow, representing the sequence.
Output Format
The number of output lines is the same as the number of input lines.
For each set of testdata, if such a partition exists, output Yes!, otherwise output No!.
6 3 1 4 5 8 7
6 3 2 1 6 5 4
Yes!
No!
Hint
Constraints
There are three sets of testdata, each set contains at most lines, all input numbers .
Set 1 (): ;
Set 2 (): ;
Set 3 (): .
Translated by ChatGPT 5
京公网安备 11011102002149号