cf/mirror

Largest Subsequence

CF
1905C1400· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
5
aaabc
3
acb
3
bac
4
zbca
15
czddeneeeemigec
13
cdefmopqsvxzz
Output
0
1
-1
2
6
0
1905C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)