摘要: 原文:https://oi-wiki.org/string/z-func/ 定义:z[i] 定义为 s[in-1] 与 s 的最长公共前缀长度 由 https://www.cnblogs.com/kingbuffalo/p/16186634.html 所讲 很多字符串算法都是应用 借助之前的计算好的 阅读全文
posted @ 2022-04-29 21:54 传说中的水牛 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 原文:https://oi-wiki.org/dp/interval/ 公式:f(i,j) = max{f(i,k) + f(k+1,j) + cost}; 没啥感觉,这不很正常。 阅读全文
posted @ 2022-04-29 13:18 传说中的水牛 阅读(13) 评论(0) 推荐(0) 编辑