摘要: #include<iostream> #include<cstdio> #include<algorithm> #include<vector> #include<cmath> #define alpha (0.75) using namespace std; const int N = 6e5 + 阅读全文
posted @ 2020-05-04 16:23 Faker_fan 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 给你一堆三维的点,每个点之间的距离是xy轴的欧式距离,代价是高度,问一颗最优比例生成树。这题是我很早之前做过的了,当初还非常非常菜,给大家看一下我的情况。 当初可真是年少无知啊,这个prim因为是稠密图,所以n方才能求生成树,很神奇啊,稠密图的最小生成树算法居然是o(e)的,不过还是很慢 阅读全文
posted @ 2020-05-04 13:33 Faker_fan 阅读(127) 评论(0) 推荐(0) 编辑
摘要: //网络流s const int INF = 0x3f3f3f3f, maxn = 210; struct E { int u, v, flow; E(int u = 0, int v = 0, int flow = 0): u(u), v(v), flow(flow) {} } edg[maxn 阅读全文
posted @ 2020-05-04 00:04 Faker_fan 阅读(86) 评论(0) 推荐(0) 编辑