【BZOJ2803】[Poi2012]Prefixuffix Description 对于两个串S1、S2,如果能够将S1的一个后缀移动到开头后变成S2,就称S1和S2循环相同。例如串ababba和串abbaab是循环相同的。给出一个长度为n的串S,求满足下面条件的最大的L:1. L<=n/22. ...
分类:
其他好文 时间:
2017-06-18 15:12:12
阅读次数:
134
题目描述 有N个节点,标号从1到N,这N个节点一开始相互不连通。第i个节点的初始权值为a[i],接下来有如下一些操作: U x y: 加一条边,连接第x个节点和第y个节点 A1 x v: 将第x个节点的权值增加v A2 x v: 将第x个节点所在的连通块的所有节点的权值都增加v A3 v: 将所有节 ...
分类:
其他好文 时间:
2017-06-18 10:26:08
阅读次数:
190
Some time the programmers have very strange ways to hide their passwords. See for example how Billy "Hacker" Geits hide his password. Billy chooses a ...
分类:
其他好文 时间:
2017-06-17 20:45:33
阅读次数:
268
Once upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was ...
分类:
其他好文 时间:
2017-06-17 19:31:23
阅读次数:
179
1009 思路: KMP上走DP(矩阵加速); DP[i][j]表示当前在第i位,同是匹配到不吉利串的第j位的方案数; 代码: ...
分类:
其他好文 时间:
2017-06-16 22:07:26
阅读次数:
163
Machine Schedule Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13071 Accepted: 5575 Description As we all know, machine scheduling is a v ...
分类:
系统相关 时间:
2017-06-16 21:14:21
阅读次数:
209
Description 给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值,其中k mod i表示k除以i的余数。例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod ...
分类:
其他好文 时间:
2017-06-16 19:19:43
阅读次数:
166
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1317 给出一个n*m的矩阵(n <= 10^100, m <= 5),对于2*2的子方格若全是黑色或全是白色的是非法的,用黑白两色去染n*m的方格,问共同拥有多少种合法的染色方案 ...
分类:
其他好文 时间:
2017-06-16 14:19:39
阅读次数:
139
Digging Time Limit: 2 Seconds Memory Limit: 65536 KB When it comes to the Maya Civilization, we can quickly remind of a term called the end of the wor ...
分类:
其他好文 时间:
2017-06-16 10:12:22
阅读次数:
152