摘要:病毒侵袭 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u 病毒侵袭 Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之
阅读全文
摘要: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 ...
阅读全文
摘要: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
阅读全文
摘要: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 ...
阅读全文
摘要: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
阅读全文
摘要:P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 P1081野生动物园 描述 cjBBteam拥有一个很大的野生动物园。这个动物园坐落在一个狭长的山谷内,这个区域从南到北被划分成N个区域,每个区域都饲养着一头狮子。这些
阅读全文
摘要:找Fn =( Fn-1 + Fn-2 ) mod n 的循环节 暴力找即可
阅读全文
摘要:Fibonacci of Fibonacci 题目链接 题目大意:求第n项斐波那契数的斐波那契,即FFn mod 20160519 先找Fn mod 20160519的循环节,啊这个可以用板子求,然后用矩阵快速幂求一下就好了 1 #include <cstdio> 2 #include <iostr
阅读全文
摘要: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
阅读全文