Stages
1011A900· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
5 3xyabd
Output
29
Sample 2of 4
Input
7 4problem
Output
34
Sample 3of 4
Input
2 2ab
Output
-1
Sample 4of 4
Input
12 1abaabbaaabbb
Output
1
58%
1011A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)