
模板
文章平均质量分 71
明太鱼
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
大素数判定,大整数因式分解模板 HDU 4910
#include #include #include #include #include #include using namespace std;typedef __int64 LL ;LL pri[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47};LL ans[100005], flag;LL gc原创 2014-08-04 14:44:38 · 761 阅读 · 0 评论 -
欧拉函数 素数筛选法模板
void init(){ __int64 i, j; p[0] = 1; //记录素数个数 p[1] = 2; for (i=3; i<N; i+=2) { if (hash[i]) continue; p[++p[0]] = i; for (j=i*i; j<N; j+=i原创 2014-08-13 15:14:05 · 671 阅读 · 0 评论 -
AC自动机模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int n,sz;int ch[1100][4],f[1100],val[1100],last[1100];void insert (char* c){原创 2014-08-09 00:20:20 · 399 阅读 · 0 评论 -
KMP模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;char cs[110][110];int f[110];void fail (char p[]){ memset(f, 0, sizeof(f))原创 2014-08-09 00:22:00 · 422 阅读 · 0 评论 -
dijkstra完整模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-01 20:25:20 · 410 阅读 · 0 评论 -
Bellman-Ford判断有负环的算法模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-01 20:59:07 · 728 阅读 · 0 评论 -
sscanf的使用 HDU 2093
#include#include#include struct c{ char name[20]; int x;//名次 int y;//时间}d[1000];int comp(const void *a,const void *b){ struct c *p1=(struct c *)a; struct c *p2=(struct c *)b原创 2014-08-20 20:41:07 · 391 阅读 · 0 评论 -
欧拉回路和欧拉路径求法 dfs递归模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-07 22:54:29 · 1929 阅读 · 0 评论 -
最大流 SAP模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-05 11:19:26 · 371 阅读 · 0 评论 -
最大流最小费用流模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-04 19:37:55 · 321 阅读 · 0 评论 -
强连通tarjan模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-06 15:07:57 · 350 阅读 · 0 评论 -
最大流模板
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-04 22:57:24 · 394 阅读 · 0 评论 -
完全匹配-最大匹配
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-04 20:57:36 · 860 阅读 · 0 评论 -
完全匹配-最小匹配
#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int int_max = 0x07777777;const int int_min = 0x8000原创 2014-08-04 20:52:26 · 776 阅读 · 0 评论 -
模板ACM开头,后续继续补充
#include#include#include#include#include#include#include#include#include#includeusing namespace std;const long long maxN = 200010;const long long maxn = 41000;const long long maxm = 300原创 2014-07-22 13:45:35 · 475 阅读 · 0 评论