摘要: [toc] AC自动机 前置知识 "KMP" [Trie](https://baike.baidu.com/item/字典树/9825209?fromtitle=Trie&fromid=140945&fr=aladdin ) 模板$code$ 数组版 题目 " P3808【模板】AC自动机(简单版) 阅读全文
posted @ 2020-02-11 18:33 白菜道士 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Life Forms Description You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, col 阅读全文
posted @ 2020-01-22 16:03 白菜道士 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Power Strings Description Given two strings a and b we define ab to be their concatenation. For example, if a = "abc" and b = "def" then ab = "abcdef" 阅读全文
posted @ 2020-01-19 17:26 白菜道士 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目 Description The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds o 阅读全文
posted @ 2020-01-19 16:32 白菜道士 阅读(193) 评论(0) 推荐(0) 编辑
摘要: KMP算法 用于改进字符串匹配算法 字符串匹配 主串中是否存在模式串 模式匹配 基本思想 从模式串的第一个字符和主串的第一个字符比较 不同时又从模式串的第一个字符和主串的第二个字符比较 直到匹配成功或匹配不成功 总结:太慢 KMP 基本思想 在模式匹配中若$S[i]==P[j]$ 匹配$S[i+1] 阅读全文
posted @ 2020-01-19 10:25 白菜道士 阅读(148) 评论(0) 推荐(1) 编辑
摘要: 求后缀数组的rank[],sa[] 思路倍增优化 |||| | | | | | | | | | | | | | | | |第0次排序|a|a|a|b|b|b|b|c|c|c|c|0|倍增| |第1次排序|aa|aa|ab|bb|bb|bb|bc|cc|cc|cc|c0|0a|$2^0$| |第2次排 阅读全文
posted @ 2020-01-17 16:48 白菜道士 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 绿色通道 Description 高二数学《绿色通道》总共有n道题目要写(其实是抄),编号1..n,抄每道题所花时间不一样,抄第i题要花a[i]分钟。由于lsz还要准备NOIP,显然不能成天写绿色通道。lsz决定只用不超过t分钟时间抄这个,因此必然有空着的题。每道题要么不写,要么抄完,不能写一半。一 阅读全文
posted @ 2020-01-15 10:17 白菜道士 阅读(358) 评论(0) 推荐(1) 编辑