摘要: AC自动机 - AcWing 1282 - 搜索关键词 #include <bits/stdc++.h> #define maxn 510000 using namespace std; int t,n,cnt; int trie[maxn][26]; int fail[maxn]; int wor 阅读全文
posted @ 2021-02-13 22:48 popozyl 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Splay - AcWing 950 - 郁闷的出纳员 之前做过这道题目,当时是用权值线段树做的。本题还可以用splay做,splay用于维护一些区间问题。这是第一道凭个人记忆打出的splay模板,可以说对于splay有一个基本的理解了。 #include <bits/stdc++.h> using 阅读全文
posted @ 2021-02-13 21:42 popozyl 阅读(71) 评论(0) 推荐(0) 编辑