cf/mirror

Non-Palindromic Substring

CF
1943B2000· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
4 4
aaab
1 4
1 3
3 4
2 4
3 2
abc
1 3
1 2
5 4
pqpcc
1 5
4 5
1 3
2 4
2 1
aa
1 2
12 1
steponnopets
1 12
Output
9
0
2
5
5
2
14
0
2
5
0
65
1943B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)