摘要: AC自动机+DP AC自动机NOIP考不考啊。。。 在AC自动机上做个DP。 设状态f[i]表示最远可以匹配到的i,然后在AC自动机上找就行了。 #include <iostream> #include <queue> #include <cstdio> #include <cstring> usi 阅读全文
posted @ 2018-10-14 17:41 SWHsz 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 背会。。。 #!/bin/bash i=0 while true ;do ./maker > data.in ./a <data.in> data.out ./b <data.in> data.ans if diff data.out data.ans ;then printf "AC\n" els 阅读全文
posted @ 2018-10-14 16:35 SWHsz 阅读(361) 评论(0) 推荐(1) 编辑
摘要: 突然发现有一道题还没做。。。 这道题数据范围是200000,枚举一下中间夹的那个点,然后随便操作一下(看代码)就行了。 #include <iostream> #include <cstdio> #include <cstring> const int N=200005,mod=10007; usi 阅读全文
posted @ 2018-10-14 11:29 SWHsz 阅读(148) 评论(0) 推荐(0) 编辑