摘要:
2022/1/17 [ D. Period ]( Problem - D - Codeforces ) 思路 分析可知要找到后缀和前缀匹配的串。 kmp的next[i]数组表示以i为结尾的非前缀字串与字符串的前缀匹配的最大长度。 那么我们求出next[n]后。 1next[n],1[next[nex 阅读全文
摘要:
2022/1/2 [ D. Shuffle ]( Problem - D - Codeforces (Unofficial mirror site, accelerated for Chinese users) ) 思路 遍历字符串 考虑一个包含k+2个1的字符串,去掉第一个1及其前面部分,和最后一 阅读全文
摘要:
2022/1/1 [ D. Keep the Average High]( Problem - D - Codeforces (Unofficial mirror site, accelerated for Chinese users) ) 思路: 一、将a[i]的每个数-x,那么题目就转换成了,将 阅读全文