← 返回 amazon 的题目列表Minimum Rounds for Substrings with Special Character
类型:online_judge
Given a string S of length L, an offset array O where O[i] is the index in S that should be replaced with '', and an integer M. In each round i, replace S[O[i]] with ''. Determine the minimum number of rounds required such that the number of substrings of S containing at least one '*' is greater than or equal to M.
Example
Input
bcced
[1, 2, 0, 3, 4]
10