摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6740 从后往前维护fail数组,枚举已出现的循环节总长度更新答案即可。 阅读全文
posted @ 2019-09-29 13:45 Venux 阅读(495) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/1087/C 列出a[i],a[i-1],a[i-2],发现a[i]=a[i-1]+a[i-2]+f[i-1]; 然后构造矩阵跑矩阵快速幂即可 阅读全文
posted @ 2019-09-29 11:08 Venux 阅读(228) 评论(0) 推荐(0) 编辑