2019年2月11日

模板】AC自动机(简单版)

摘要: 模板】AC自动机(简单版) https://www.luogu.org/problemnew/show/P3808 这是一道简单的AC自动机模板题。 用于检测正确性以及算法常数。 为了防止卡OJ,在保证正确的基础上只有两组数据,请不要恶意提交。 管理员提示:本题数据内有重复的单词,且重复单词应该计算 阅读全文

posted @ 2019-02-11 23:14 Fighting_sh 阅读(175) 评论(0) 推荐(0) 编辑

P3375 【模板】KMP字符串匹配

摘要: P3375 【模板】KMP字符串匹配 https://www.luogu.org/problemnew/show/P3375 题目描述 如题,给出两个字符串s1和s2,其中s2为s1的子串,求出s2在s1中所有出现的位置。 为了减少骗分的情况,接下来还要输出子串的前缀数组next。 (如果你不知道这 阅读全文

posted @ 2019-02-11 21:42 Fighting_sh 阅读(164) 评论(0) 推荐(0) 编辑

Codeforces Beta Round #25 (Div. 2 Only)

摘要: Codeforces Beta Round #25 (Div. 2 Only) http://codeforces.com/contest/25 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 阅读全文

posted @ 2019-02-11 11:44 Fighting_sh 阅读(165) 评论(0) 推荐(0) 编辑

导航