cf/mirror

Increasing Subsequence (easy version)

CF
1157C11300· pupil2s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 4
Input
5
2 1 5 4 3
Output
4
LRRR
Sample 2of 4
Input
7
1 3 5 6 7 4 2
Output
7
LRLRLLL
Sample 3of 4
Input
3
1 2 3
Output
3
LLL
Sample 4of 4
Input
4
1 2 4 3
Output
4
LLRL
1157C1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)