2020 牛客多校训练第一场之 A——B-Suffix Array 题解

输出描述: For each test case, print n integers which denote the result.c++ 输入 2 aa 3 aba 5 abaabweb 输出 2 1 3 2 1 5 4 2 1 3 数组 题解: c[i]的值是i后面离“i指针”对应的字母最近的与s[i]同字符的距离,字符串的后缀数组就与这个c数组的后缀数组。能够把这个c数组给模拟出来,求出它
相关文章
相关标签/搜索