摘要: //宁用大量的二维不用量小的三维#include #include#includeusing namespace std;int prime[1000],num[10005];int Cout;void initPrime(){ for(int i=2;i>n) { cn=... 阅读全文
posted @ 2014-11-15 23:47 keyboard3 阅读(252) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int Next[100005];void getnext(const char *W,int *next){ int j=0,k=-1; next[0]=-1; while(!j || W[j]... 阅读全文
posted @ 2014-11-15 22:13 keyboard3 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 通过阶段性计算减少一次性的大值计算#include int main(){ int t, a, b, i; __int64 c; scanf("%d", &t); while(t--) { scanf("%d%d", &a, &b); if(... 阅读全文
posted @ 2014-11-15 00:09 keyboard3 阅读(90) 评论(0) 推荐(0) 编辑