cf/mirror

Division + LCP (easy version)

CF
1968G11900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
3 3 3
aba
3 3 3
aaa
7 2 2
abacaba
9 4 4
abababcab
10 1 1
codeforces
9 3 3
abafababa
5 3 3
zpozp
Output
0
1
3
2
10
2
0
1968G1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)