04 2015 档案
摘要:第一种方法是kmp:将一个数组复制一次,然后再用另一个进行匹配。#include #include #include #include using namespace std;const int N = 200005;const int MOD = 360000;int a[N],b[N],c[2*...
阅读全文
摘要:Problem CSAM I AMInput:Standard InputOutput:Standard OutputThe world is in great danger!!Mental'sforceshave returned to Earth to eradicate humankind. ...
阅读全文
摘要:G -Awesome Backup SystemTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 2030DescriptionIt is known that all...
阅读全文
摘要:a,b,c三道题有A,B,C三个答案。错排就是这三道题有多少种错误答案。公式:a[i]=(i-1)*(a[i-1]+a[i-2]);a[1]=0;a[2]=1;
阅读全文
摘要:I -Conspiracy Theory and RebrandingTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 2032DescriptionToday is ...
阅读全文
摘要:K -CaravansTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 2034DescriptionStudent Ilya often skips his clas...
阅读全文
摘要:汉诺塔的水题(还没有遇到难的QAQ)一般都是一层层来求!公式:a[i]=a[i-1]*2+1;a[1]=1;a[i]表示从A上把i层移到另一个的步数。
阅读全文
摘要:#include using namespace std;int cmn(int n,int m){ int ans=1; for(int i=1;i>n>>m) { cout<<cmn(n,m)<<endl; } return 0;}View Code
阅读全文

浙公网安备 33010602011771号