// You are given a string s consisting of lowercase characters and an integer k, You have to count all possible substrings that have exactly k distinct characters.
int res = contiguousStrings(str, i + 1, j, n - 1) + contiguousStrings(str, i, j - 1, n - 1) - contiguousStrings(str, i + 1, j - 1, n - 2); ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果