上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 57 下一页

2017年10月8日

hdu 2222 ac自动机更新模板 for onSite contest

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=2222 #include <cstdio> #include <cstdlib> #include <cstring> const int maxn = 1000000 + 20; const int 阅读全文

posted @ 2017-10-08 07:24 stupid_one 阅读(190) 评论(0) 推荐(0) 编辑

2017年10月7日

F. Cooking Time 贪心

摘要: http://codeforces.com/gym/101498/problem/F 对于知道使用情况的置换算法,最优解是找一个最后需要使用的物品替换掉 也就是,如果一个物品后面已经不需要用到,就要拿出来了,碍地方 #include <bits/stdc++.h> #define IOS ios:: 阅读全文

posted @ 2017-10-07 10:13 stupid_one 阅读(375) 评论(0) 推荐(0) 编辑

2017年10月6日

Engineer Assignment HDU - 6006 状压dp

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=6006 比赛的时候写了一个暴力,存暴力,过了,还46ms 那个暴力的思路是,预处理can[i][j]表示第i个人能否胜任第j个项目,能胜任的条件就是它和这个项目有共同的需求。 然后暴力枚举每一个人去搭配 阅读全文

posted @ 2017-10-06 07:52 stupid_one 阅读(304) 评论(0) 推荐(0) 编辑

2017年10月3日

循环队列的复习

摘要: struct MyQueue { //循环队列需要少用一个 int que[1000000], head, tail, MXSIZE; void init() { MXSIZE = 1000000; // 1e6 head = tail = 0; } bool isEmpty() { return 阅读全文

posted @ 2017-10-03 09:58 stupid_one 阅读(144) 评论(0) 推荐(0) 编辑

2017年9月29日

#1413 : Rikka with String 后缀自动机 + 二级差分

摘要: http://hihocoder.com/problemset/problem/1413?sid=1199641 这题断断续续做了2个多星期吧,一直不会 设总答案为sum,替换后新加的子串数量为x,失去的是y,那么每个位置的答案就是sum + x[i] - y[i] 首先可以知道如果把某个位置设置成 阅读全文

posted @ 2017-09-29 11:11 stupid_one 阅读(233) 评论(0) 推荐(0) 编辑

2017年9月17日

HDU - 6208 The Dominator of Strings HDU - 6208 AC自动机 || 后缀自动机

摘要: https://vjudge.net/problem/HDU-6208 首先可以知道最长那个串肯定是答案 然后,相当于用n - 1个模式串去匹配这个主串,看看有多少个能匹配。 普通kmp的话,每次都要O(mxLen)的复杂度肯定不行。考虑AC自动机,不说这个算法了都懂。 大概就是,询问主串的时候用F 阅读全文

posted @ 2017-09-17 21:40 stupid_one 阅读(268) 评论(2) 推荐(0) 编辑

Barty's Computer 字典树

摘要: https://nanti.jisuanke.com/t/17122 Barty have a computer, it can do these two things. Add a new string to its memory, the length of this string is eve 阅读全文

posted @ 2017-09-17 09:59 stupid_one 阅读(424) 评论(0) 推荐(0) 编辑

2017年9月11日

SETI ACdream - 1430 后缀自动机求不相交子串

摘要: http://blog.csdn.net/gatevin/article/details/45875343 题目是求不重叠的不同子串个数 一般来说, endpos集合包含了子串结尾位置,结尾在"3、4、6"等 每个状态都包含了若干个连续子串。就是"aabab", "abbab", "bbab", " 阅读全文

posted @ 2017-09-11 13:46 stupid_one 阅读(365) 评论(0) 推荐(0) 编辑

2017年9月10日

E. Three strings 广义后缀自动机

摘要: http://codeforces.com/problemset/problem/452/E 多个主串的模型。 建立一个广义后缀自动机,可以dp出每个状态的endpos集合大小。同时也维护一个R[]表示那个串出现过。 所以可以算出每个状态的dp[i][k]表示第k个串在第i个状态中出现的次数。 可以 阅读全文

posted @ 2017-09-10 01:27 stupid_one 阅读(256) 评论(0) 推荐(0) 编辑

2017年9月7日

把程序添加到右键菜单 + 图标

摘要: https://jingyan.baidu.com/article/7c6fb428321b4a80642c90fd.html 用win + R 打开注册表 regedit 修改 在shell里面添加一个项,为Chrome 其中有一个默认的,里面填写右键菜单栏出现的名字 然后右键Chrome那里,新 阅读全文

posted @ 2017-09-07 14:02 stupid_one 阅读(526) 评论(0) 推荐(1) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 57 下一页

导航