10 2015 档案
网络流dinic模板
摘要:#include #include #include #include #include #include #include #define ll long long#define INF 0x3f3f3f3f#define cle(a) memset(a,0,sizeof(a))using nam... 阅读全文
posted @ 2015-10-20 19:45 Beserious 阅读(366) 评论(0) 推荐(0) 编辑
基础线段树
摘要:1.hdu 1166 单点更新,维护区间和 /* *********************************************** Author :pk28 Created Time :2015/9/15 19:38:46 File Name :4.cpp ************** 阅读全文
posted @ 2015-10-17 20:51 Beserious 阅读(250) 评论(0) 推荐(0) 编辑
大整数分解质因数(Pollard rho算法)
摘要:#include #include #include #include #include #include #include #include#define ll long long#define INF 0x3f3f3f3f#define maxn 10000+10#define cle(a) m... 阅读全文
posted @ 2015-10-17 08:46 Beserious 阅读(3840) 评论(0) 推荐(0) 编辑
Codeforces Round #326 (Div. 2)
摘要:B. Duff in Lovetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuff is in love with lovely numbe... 阅读全文
posted @ 2015-10-17 00:24 Beserious 阅读(159) 评论(0) 推荐(0) 编辑
UVAlive 6611 Alice's Print Service 二分
摘要:Alice is providing print service, while the pricing doesn't seem to be reasonable, so people using her print service found some tricks to save money.F... 阅读全文
posted @ 2015-10-15 20:41 Beserious 阅读(597) 评论(0) 推荐(0) 编辑
miller_rabin模板
摘要:miller_rabin素数测试法#include #include #include #include #include #include #include #include #define ll long longusing namespace std;ll mod_mul(ll a,ll b,... 阅读全文
posted @ 2015-10-14 20:47 Beserious 阅读(377) 评论(0) 推荐(0) 编辑
HDU 5391 Zball in Tina Town
摘要:Zball in Tina Town Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1371 Accepted Submission(s): 阅读全文
posted @ 2015-10-14 20:43 Beserious 阅读(332) 评论(0) 推荐(0) 编辑
manacher求最长回文子串算法模板
摘要:#include #include #include #include #include #include #include using namespace std; #define maxn 110100 int p[2*maxn]; char s[2*maxn]; void manacher(char *s){ int n=strlen(s); for... 阅读全文
posted @ 2015-10-13 09:29 Beserious 阅读(143) 评论(0) 推荐(0) 编辑
HDU 2444 The Accomodation of Students(判断二分图+最大匹配)
摘要:The Accomodation of StudentsTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3775Accepted Submissio... 阅读全文
posted @ 2015-10-06 21:10 Beserious 阅读(167) 评论(0) 推荐(0) 编辑
IRRIGATION LINES
摘要:IRRIGATIONLINESTime Limit:2000ms,Special Time Limit:5000ms,Memory Limit:65536KBTotal submit users:6,Accepted users:6Problem 13449 :No special judgemen... 阅读全文
posted @ 2015-10-06 19:36 Beserious 阅读(193) 评论(0) 推荐(0) 编辑
二分图最大匹配模板
摘要:也称匈牙利算法。这里使用的邻接表的数据结构时间复杂度为O(n*m)空间复杂度为O(n+m)板子如下:struct node{ int v,next;}edge[maxn];int pre[maxn],l,vis[maxn],match[maxn];int tot,n,m;void init()... 阅读全文
posted @ 2015-10-06 19:23 Beserious 阅读(171) 评论(0) 推荐(0) 编辑
usaco2008 nov 区间异或求和
摘要:数据 http://contest.usaco.org/TESTDATA/NOV08_1.htm 阅读全文
posted @ 2015-10-04 17:06 Beserious 阅读(315) 评论(0) 推荐(0) 编辑