Subsequences (easy version)
1183E2000· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
4 5asdf
Output
4
Sample 2of 4
Input
5 6aaaaa
Output
15
Sample 3of 4
Input
5 7aaaaa
Output
-1
Sample 4of 4
Input
10 100ajihiushda
Output
233
58%
1183E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…