
字符串
文章平均质量分 80
whzzt
这个作者很懒,什么都没留下…
展开
-
[JSOI2007] [BZOJ1031] 字符加密Cipher - 后缀数组
1031: [JSOI2007]字符加密CipherTime Limit: 10 Sec Memory Limit: 162 MBSubmit: 5240 Solved: 2164[Submit][Status][Discuss]Description喜欢钻研问题的JS 同学,最近又迷上了对加密方法的思考。一天,他突然想出了一种他认为是终极的加密办法:把需要加密的信息排原创 2016-03-12 23:01:50 · 374 阅读 · 0 评论 -
[BZOJ3160] 万径人踪灭 - FFT快速傅里叶变换 - manacher
大爷题解:BZOJ 3160 万径人踪灭 讲道理的话思路我是想到了的……然后不会manacher就现学了一发。 记得有些奇奇怪怪的地方要用long long!#include "set"#include "map"#include "math.h"#include "vector"#include "stdio.h"#include "string原创 2016-06-04 18:39:18 · 719 阅读 · 0 评论 -
[BZOJ3172] [TJOI2013] 单词 - AC自动机
模板题 == 大水题!#include "stdio.h"#include "algorithm"#include "iostream"#include "string.h"#include "stdlib.h"#include "math.h"#include "vector"#include "map"#include "set" #define ich(x) x-'a'原创 2016-06-12 18:01:49 · 281 阅读 · 0 评论 -
[BZOJ3998] [TJOI2015] 弦论 - 后缀自动机
首先吐槽为什么普遍反映CLJ的PPT好懂啊……是我语文水平太差所以没看懂……?(大雾) 其实后缀自动机的话多画画就好了吧(大雾 蒟蒻只能直接贴代码#include "stdio.h"#include "algorithm"#include "iostream"#include "string.h"#include "stdlib.h"#includ原创 2016-06-16 23:46:34 · 444 阅读 · 0 评论 -
[BZOJ2806] [CTSC2012] Cheat - 后缀自动机 - DP - 单调队列
2806: [Ctsc2012]CheatTime Limit: 20 Sec Memory Limit: 256 MBSubmit: 956 Solved: 494[Submit][Status][Discuss]DescriptionInput第一行两个整数N,M表示待检查的作文数量,和小强的标准作文库的行数接下来M行的01串,表示标准作原创 2016-06-19 22:05:48 · 403 阅读 · 0 评论 -
[BZOJ3238] [AHOI2013] 差异 - 后缀自动机
3238: [Ahoi2013]差异Time Limit: 20 Sec Memory Limit: 512 MBSubmit: 1968 Solved: 896[Submit][Status][Discuss]DescriptionInput一行,一个字符串SOutput 一行,一个整数,表示所求值Sample Input原创 2016-06-28 16:06:04 · 776 阅读 · 0 评论 -
[BZOJ2754] 喵星球上的点名 - AC自动机/后缀数组/后缀自动机/玄学♂暴力
纸张蒟蒻zzt只会写sam只会套板子qaq#include"bits/stdc++.h"using namespace std;#define mmap(x,y) make_pair(x,y)#define fge getchar()template inline void read(MyInt&x){ x=0;int f=1;char ch=fge; while(ch>'9'原创 2016-07-29 12:55:44 · 856 阅读 · 0 评论 -
[BZOJ4516] [SDOI2016] 生成魔咒 - 后缀数组/后缀自动机
感觉还是SAM比较好写QAQ。显然ans就是∑len[i]-len[fail[i]]#include"bits/stdc++.h"#define mmap map::iteratorusing namespace std;const int N=200005;struct SAM{ mape[N];long long res; int len[N],fail[N],cnt,原创 2016-08-08 20:52:18 · 341 阅读 · 0 评论 -
[BZOJ4032] [HEOI2015] 最短不公共子串 - 后缀自动机,序列自动机,BFS
4032: [HEOI2015]最短不公共子串Time Limit: 10 Sec Memory Limit: 256 MBSubmit: 398 Solved: 189[Submit][Status][Discuss]Description 在虐各种最长公共子串、子序列的题虐的不耐烦了之后,你决定反其道而行之。一个串的“子串”指的是它的连续的一段,例如bcd是ab原创 2016-09-18 13:53:00 · 914 阅读 · 0 评论