摘要: " 题目链接 " Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in thes 阅读全文
posted @ 2017-08-10 19:48 渡…… 阅读(234) 评论(1) 推荐(0) 编辑
摘要: " 题目链接 " Problem Description Give an array A, the index starts from 1. Now we want to know Bi=maxi∤jAj , i≥2. Input The first line of the input gives 阅读全文
posted @ 2017-08-10 19:28 渡…… 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 首先简要介绍一下AC自动机:Aho Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有模式树(字典树)Trie和KMP模式匹配 阅读全文
posted @ 2017-08-10 09:54 渡…… 阅读(40488) 评论(9) 推荐(17) 编辑