cf/mirror

RGB Substring (hard version)

CF
1196D21600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3
5 2
BGGGG
5 3
RBRGR
5 5
BBBRR
Output
1
0
3
1196D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)