kruscal重构树
文章平均质量分 71
枫茗、
HELLO,WORLD!
展开
-
Life is a game--icpc上海
题目链接: H-Life is a Game_第 46 届 ICPC 国际大学生程序设计竞赛亚洲区域赛(上海) (nowcoder.com) 题意: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf=2e9+10; const int N=1e5+10; const int M=2*N; int a[N]; int h[M],ne[M*2],to[M*2],cnt原创 2022-04-13 16:56:52 · 307 阅读 · 0 评论 -
货车运输--kruscal重构树板子
代码: #include <bits/stdc++.h> using namespace std; const int N=1e5+10; const int M=2*N; const int inf=0x3f3f3f3f; int a[N]; int h[M],ne[M*2],to[M*2],cnt1,cnt3; int n,m,q; int root[N],val[M],dep[M],cnt2; int fa[M][22]; bool vis[N]; typedef struct e原创 2022-04-12 21:23:05 · 231 阅读 · 0 评论