cf/mirror

A Trivial String Problem

CF
2209E2200· master4s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
1 1
a
1 1
5 2
aaaaa
1 5
2 4
6 2
abcdef
1 6
3 5
6 3
abaaba
1 6
1 3
2 6
7 3
abcabca
1 7
2 7
4 7
8 3
aababaac
1 8
2 8
3 7
Output
1
15
6
6
3
14
4
7
12
9
5
13
14
7
2209E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)