cf/mirror

Consecutive Subsequence

CF
977F1700· expert2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 4
Input
7
3 3 4 7 5 6 8
Output
4
2 3 5 6
Sample 2of 4
Input
6
1 3 5 2 4 6
Output
2
1 4
Sample 3of 4
Input
4
10 9 8 7
Output
1
1
Sample 4of 4
Input
9
6 7 8 3 4 5 9 10 11
Output
6
1 2 3 7 8 9
977F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)