摘要: 代码如下 cpp include using namespace std; typedef long long LL; const int mod = 51061; struct node { node l, r, p; int rev, val; LL sum, add, mul, sz; nod 阅读全文
posted @ 2019-09-21 22:15 shellpicker 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目大意:给定 N 个点,M 条边的无向图,支持两种操作:动态删边和查询任意两点之间路径上边权的最大值最小是多少。 题解: 引理:对原图求最小生成树,可以保证任意两点之间的路径上边权的最大值取得最小值。 证明:任取两点 x, y,若 x, y 的路径上最大值最小的边不在最小生成树的路径上,可以将那条 阅读全文
posted @ 2019-09-21 11:32 shellpicker 阅读(120) 评论(0) 推荐(0) 编辑