cf/mirror

Segment Occurrences

CF
1016B1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
10 3 4
codeforces
for
1 3
3 10
5 6
5 7
Output
0
1
0
1
Sample 2of 3
Input
15 2 3
abacabadabacaba
ba
1 15
3 4
2 14
Output
4
0
3
Sample 3of 3
Input
3 5 2
aaa
baaab
1 3
1 1
Output
0
0
1016B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)