摘要:
开两个线段树,一个维护和,一个维护最大值。 #include<bits/stdc++.h> using namespace std; #define int long long const int maxn=300000+100; int n,q; int beg[maxn],nex[maxn],t 阅读全文
posted @ 2020-02-29 22:36
syzf2222
阅读(137)
评论(0)
推荐(0)
摘要:
这是一个初学树剖很好的练手题。 我想我只需要放个代码…… #include<bits/stdc++.h> using namespace std; #define int long long const int maxn=1000000; int n,m; int beg[maxn],nex[max 阅读全文
posted @ 2020-02-29 22:33
syzf2222
阅读(113)
评论(0)
推荐(0)
摘要:
说什么并查集,就是数连通块。 #include<bits/stdc++.h> using namespace std; const int maxn=1005; int a[maxn][maxn]; int vis[maxn]; int n,m; void dfs(int x){ if(vis[x] 阅读全文
posted @ 2020-02-29 22:20
syzf2222
阅读(95)
评论(0)
推荐(0)
摘要:
以下是最小生成树+并查集 HDU 1213 基础并查集★ -->Solution HDU 1272 基础并查集★ -->SolutionHDU 1325 Tree? -->SolutionHDU 1856 基础并查集★ -->SolutionHDU 1102 基础最小生成树★-->SolutionH 阅读全文
posted @ 2020-02-29 19:50
syzf2222
阅读(148)
评论(0)
推荐(0)
摘要:
1.树上操作 Solution 2.树的统计 Solution 3.Disruption P Solution 4.最短距离 Solution 5.Qtree1 Solution 6.魔法树 Solution 7.软件包管理器 Solution 8.松树的新家 Solution 9.旅游 Solut 阅读全文
posted @ 2020-02-29 17:16
syzf2222
阅读(128)
评论(0)
推荐(0)

浙公网安备 33010602011771号