10 2016 档案

HDU 2896 ac自动机裸题
摘要:病毒侵袭 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u 病毒侵袭 Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之 阅读全文

posted @ 2016-10-13 12:29 disppr 阅读(197) 评论(0) 推荐(0)

ac自动机模板
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int MAX = 26; 7 struct node{ 8 node *fail; 9 node *next[MAX]; 10 int cnt; 11 node(){ 12 ... 阅读全文

posted @ 2016-10-12 14:00 disppr 阅读(192) 评论(0) 推荐(0)

poj 3735 Training little cats矩阵快速幂
摘要:Training little cats Description Facer's pet cat just gave birth to a brood of little cats. Having considered the health of those lovely cats, Facer d 阅读全文

posted @ 2016-10-07 18:21 disppr 阅读(125) 评论(0) 推荐(0)

KMP算法模板 求子串和模板串首先匹配的位置
摘要:1 #include 2 using namespace std; 3 4 const int MAXN = 1e6 + 10; 5 int nex[MAXN]; 6 int s[MAXN], t[MAXN]; 7 8 void get_nex(int lm) { 9 int i = 0, j = -1; nex[0] = -1; 10 ... 阅读全文

posted @ 2016-10-06 23:39 disppr 阅读(431) 评论(0) 推荐(0)

hdoj 2665 Kth number主席树裸
摘要:Kth number Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9417 Accepted Submission(s): 2938 Pro 阅读全文

posted @ 2016-10-06 18:01 disppr 阅读(270) 评论(0) 推荐(0)

vijos P1081野生动物园 主席树求区间第K大
摘要:P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 描述 cjBBteam拥有一个很大的野生动物园。这个动物园坐落在一个狭长的山谷内,这个区域从南到北被划分成N个区域,每个区域都饲养着一头狮子。这些 阅读全文

posted @ 2016-10-06 17:14 disppr 阅读(185) 评论(0) 推荐(0)

UVA - 11582 Colossal Fibonacci Numbers!循环节
摘要:找Fn =( Fn-1 + Fn-2 ) mod n 的循环节 暴力找即可 阅读全文

posted @ 2016-10-05 22:47 disppr 阅读(176) 评论(0) 推荐(0)

MIPT-2016 Pre-Finals Workshop, Taiwan NTU Contest Fibonacci of Fibonacci
摘要:Fibonacci of Fibonacci 题目链接 题目大意:求第n项斐波那契数的斐波那契,即FFn mod 20160519 先找Fn mod 20160519的循环节,啊这个可以用板子求,然后用矩阵快速幂求一下就好了 1 #include <cstdio> 2 #include <iostr 阅读全文

posted @ 2016-10-05 22:05 disppr 阅读(198) 评论(0) 推荐(0)

斐波那契数列寻找mod n 循环节 模板
摘要:该代码来自ACdreamer 阅读全文

posted @ 2016-10-05 14:27 disppr 阅读(784) 评论(0) 推荐(0)

BestCoder Round #88
摘要:A、Find Q Accepts: 392 Submissions: 780 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) A、Find Q Accepts: 392 Submis 阅读全文

posted @ 2016-10-01 21:45 disppr 阅读(267) 评论(0) 推荐(0)