
【数据结构】可并堆
cz_xuyixuan
这个作者很懒,什么都没留下…
展开
-
【BZOJ1455】罗马游戏
【题目链接】点击打开链接【思路要点】可并堆模板题。【代码】#include<bits/stdc++.h>using namespace std;#define MAXN 1000005struct Node { int father, value; int child[2], depth[2];};int n, m;Node a[MAXN];bool killed[M...原创 2018-03-18 14:21:44 · 261 阅读 · 0 评论 -
【BZOJ1367】【Baltic2004】sequence
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】#include<bits/stdc++.h>using namespace std;#define MAXN 1000005struct Node { int value, father, size; int child[2], depth[2];};Node a[MAXN];int n, top, Sta...原创 2018-03-18 15:43:17 · 221 阅读 · 0 评论 -
【BZOJ2809】【APIO2012】dispatching
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】#include<bits/stdc++.h>using namespace std;#define MAXN 100005struct Node { int father, size; long long value, sum; int child[2], depth[2];};Node a[MAXN];...原创 2018-03-18 19:45:24 · 179 阅读 · 0 评论 -
【BZOJ2333】【SCOI2011】棘手的操作
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】#include<bits/stdc++.h>using namespace std;#define MAXN 300005#define INF 1e9struct Node { int lc, rc; int maxnum, tag;};Node a[MAXN * 2];int n, q, timer,...原创 2018-03-19 14:03:24 · 243 阅读 · 0 评论 -
【校内训练2019-07-09】探险队
【思路要点】考虑计算 fif_ifi 表示到达点 iii 后发现 iii 的一条邻边断开,最坏情况下到达 TTT 的的最短路。注意到图是无向图,可以从 TTT 出发建立一棵最短路树,则最坏情况显然是断开 iii 的父边的情况。枚举一条非树边 (x,y,w)(x,y,w)(x,y,w) ,则对于 x,yx,yx,y 路径上的一个非 Lca(x,y)Lca(x,y)Lca(x,y) 的点 ...原创 2019-07-09 14:23:05 · 401 阅读 · 0 评论