上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 36 下一页
摘要: 状压 dp。参考 "there" cpp include include include include using namespace std; typedef long long ll; int T, h, w, m, n, dp[1055][1055], qx[55], qy[55], dx, 阅读全文
posted @ 2018-04-16 11:11 poorpool 阅读(192) 评论(0) 推荐(0)
摘要: 给出的图是一个二分图(显然……吗),一个图的最大团=其补图的最大独立集,因此二分图的最大独立集就是补图的最大团。 欲使补图最大团变大,则要最大独立集变大。二分图最大独立集=点数 最小点覆盖。最小点覆盖=最大匹配。 即搞掉哪些边使得最大匹配变小。即二分图的必经边。 二分图的必经边的判断:流量为 $1$ 阅读全文
posted @ 2018-04-15 20:17 poorpool 阅读(287) 评论(0) 推荐(0)
摘要: "there" cpp include include using namespace std; int n, m, mod, nxt[25], too[25][15]; char ss[25]; struct Matrix{ int num[25][25]; Matrix operator (co 阅读全文
posted @ 2018-04-14 08:40 poorpool 阅读(122) 评论(0) 推荐(0)
摘要: "there" 阅读全文
posted @ 2018-04-13 19:48 poorpool 阅读(242) 评论(0) 推荐(0)
摘要: 所有的下标从 $0$ 开始。 考虑枚举 $C$ (第一个加上负的等于第二个加上其绝对值)和第二个手链的偏移量 $p$。答案就是 $$\sum_{i=0}^{n 1}(x_i+C y_{(i+p) \bmod n})^2$$ 复制一遍 $y$ 数组就能去掉取模了,再展开就是 $$\sum_{i=0}^ 阅读全文
posted @ 2018-04-13 16:08 poorpool 阅读(158) 评论(0) 推荐(0)
摘要: 鬼畜线段树…… "Orz Capella" cpp include include using namespace std; int n, m, uu, vv, opt; double xx[100005], yy[100005], ss, tt, faq[4]; struct SGT{ doubl 阅读全文
posted @ 2018-04-13 08:45 poorpool 阅读(150) 评论(0) 推荐(0)
摘要: "there" cpp include include using namespace std; int n, m, dfn[100005], idx, hea[100005], cnt, uu, vv, siz[100005], fa[100005][19]; int dep[100005], v 阅读全文
posted @ 2018-04-12 20:17 poorpool 阅读(188) 评论(0) 推荐(0)
摘要: "there" 阅读全文
posted @ 2018-04-12 15:42 poorpool 阅读(228) 评论(0) 推荐(0)
摘要: 裸dinic就跑过去了,哪用得着平面图最小割=最短路…… cpp include include include include using namespace std; int n, m, w, ss, tt, hea[1000005], cnt, lev[1000005], cur[100000 阅读全文
posted @ 2018-04-12 09:52 poorpool 阅读(150) 评论(0) 推荐(0)
摘要: 狗题卡我精度…… "sol" cpp include include include include include include using namespace std; int n; struct Point{ double x, y; }pt[100005], O; double r; co 阅读全文
posted @ 2018-04-11 21:06 poorpool 阅读(101) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 36 下一页