02 2016 档案
摘要:费马小定理 P为 质数 a为任意整数 $ a^{p 1} \equiv 1 (\mod p)$ 线性筛 欧拉筛 for(int i=2;i<=n;i++) { if(!is_prime[i]) { prime[++top]=i; } for(int j=1;j<=top && i prime[j]<
阅读全文
摘要:链剖 1 #include <cstdio> 2 #include <iostream> 3 #include <algorithm> 4 #include <cstring> 5 using namespace std; 6 #define INF 1000000000 7 #define N 3
阅读全文
摘要:好颓啊!! 做题好慢!! 各种错误!! 1014: [JSOI2008]火星人prefix 额 splay没啥说的 字符串hash蒟蒻不会啊 搞半天才懂 好玄学啊 unsigned的自然溢出也是玄学啊 (话说我 int的自然溢出也A了smg?? 1 #include <cstdio> 2 #incl
阅读全文
摘要:我这么弱 只能通过刷水体来增加AC数目啦
阅读全文
摘要:比赛时发现憋不出模板啦这真是伤心 只写2次的东西真心记不住贴个以前的模板 多敲几遍POJ 3461 1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 using namespace std; 5 int T,la,lb; 6
阅读全文
摘要:带着 freopen提交会TLE....... 1 #include <cstdio> 2 #include <iostream> 3 #include <string> 4 #include <algorithm> 5 using namespace std; 6 #define N 100000
阅读全文
摘要:.. #include <cstdio>#include <cmath>#include <algorithm>using namespace std;#define LL long longLL n,A,B,C,a[10000000+1];int main(){ scanf("%d%d%d%d%d
阅读全文
摘要:1 #include <cstdio> 2 #include <iostream> 3 #include <cmath> 4 #include <algorithm> 5 #include <cstring> 6 using namespace std; 7 8 int p[1001][1001];
阅读全文
浙公网安备 33010602011771号