cf/mirror

Longest Good Subsequence

CF
2124H3400· legendary gm7s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
5
1 1 3 3 5
3
1 1 2
4
2 2 2 2
7
1 2 4 2 4 6 2
1
1
Output
5
2
0
5
1
2124H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…