cf/mirror

Increasing Subsequence (hard version)

CF
1157C21700· expert2s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 4
Input
5
1 2 4 3 2
Output
4
LRRR
Sample 2of 4
Input
7
1 3 5 6 5 4 2
Output
6
LRLRRR
Sample 3of 4
Input
3
2 2 2
Output
1
R
Sample 4of 4
Input
4
1 2 4 3
Output
4
LLRR
1157C2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)