2018年8月14日

多项式相关算法模板

摘要: 多项式乘法 1 #include <bits/stdc++.h> 2 using namespace std; 3 const double pi = acos(-1); 4 const int LEN = 1e5 + 5; 5 int n, m, N; 6 namespace ploy { 7 s 阅读全文

posted @ 2018-08-14 18:47 NineSwords 阅读(165) 评论(0) 推荐(0) 编辑

2018年8月13日

二分图匹配问题

摘要: 二分图最大匹配 二分图最大权匹配 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int LEN = 1e3 + 5; 4 typedef long long ll; 5 int n, n1, n2, m; 6 const int 阅读全文

posted @ 2018-08-13 18:50 NineSwords 阅读(141) 评论(0) 推荐(0) 编辑

一般图匹配

摘要: 一般图最大匹配+输出方案 1 #include <bits/stdc++.h> 2 using namespace std; 3 namespace edmond { 4 const int LEN = 4e4 + 5; 5 int n, m, ans, tot, qh, qt, Time; 6 i 阅读全文

posted @ 2018-08-13 18:06 NineSwords 阅读(183) 评论(0) 推荐(0) 编辑

2018年8月3日

三种上下界网络流模板

摘要: 1 /* 2 首先建立一个源S和一个汇T,一般称为附加源和附加汇。 3 对于图中的每条弧<u,v>,假设它容量上界为c,下界b,那么把这条边拆为三条只有上界的弧。 4 一条为<S,v>,容量为b; 5 一条为<u,T>,容量为b; 6 一条为<u,v>,容量为c-b。 7 其中前两条弧一般称为附加弧 阅读全文

posted @ 2018-08-03 19:31 NineSwords 阅读(378) 评论(0) 推荐(0) 编辑

最大流模板

摘要: 这个ISAP模板只能增广一次,在残量网络上跑就会有问题,但是效率不错。 1 namespace ISAP { 2 int tot, n, m, src, tar, qh, qt, cnt; 3 ll ans; 4 struct edge { 5 int vet, next, len; 6 } E[L 阅读全文

posted @ 2018-08-03 18:52 NineSwords 阅读(223) 评论(0) 推荐(0) 编辑

2018年7月18日

2017-2018 Petrozavodsk Winter Training Camp, Saratov SU Contest

摘要: 2017-2018 Petrozavodsk Winter Training Camp, Saratov SU Contest 阅读全文

posted @ 2018-07-18 20:55 NineSwords 阅读(739) 评论(0) 推荐(0) 编辑

2018年7月14日

2013 Asia Chengdu Regional Contest

摘要: 2013 Asia Chengdu Regional Contest Assignment For Princess Beautiful Soup Clumsy Algorithm Dinner Coming Soon Exhausted Robot Fibonacci Tree GRE Words 阅读全文

posted @ 2018-07-14 18:33 NineSwords 阅读(109) 评论(0) 推荐(0) 编辑

2018年7月13日

ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków

摘要: ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik’s RectangleProblem B: What does the fox say?Problem C: M 阅读全文

posted @ 2018-07-13 20:48 NineSwords 阅读(122) 评论(0) 推荐(0) 编辑

2018年7月12日

ACM ICPC 2010–2011, Northeastern European Regional Contest St Petersburg – Barnaul – Tashkent – Tbilisi, November 24, 2010

摘要: ACM ICPC 2010–2011, Northeastern European Regional Contest St Petersburg – Barnaul – Tashkent – Tbilisi, November 24, 2010 Problem A. Alignment of Cod 阅读全文

posted @ 2018-07-12 21:26 NineSwords 阅读(282) 评论(0) 推荐(0) 编辑

2018年7月11日

Warsaw U Contest Petrozavo dsk Summer 2011 Training Camp, Monday, September 5, 2011

摘要: Warsaw U Contest Petrozavo dsk Summer 2011 Training Camp, Monday, September 5, 2011 Problem A.ChocolateProblem B.Programming ContestProblem C.DrawingP 阅读全文

posted @ 2018-07-11 11:36 NineSwords 阅读(139) 评论(0) 推荐(0) 编辑

导航