摘要: \(tarjan\) 大合辑 1.割边: #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10, M = 1e6 + 10; int hd[N], nt[M], to[M], tot = 1;/////// tot = 阅读全文
posted @ 2022-06-03 11:53 Faker_yu 阅读(40) 评论(0) 推荐(0)
摘要: 洛谷P2680 运输计划 题意:给一棵 \(n~(n \le 3 \times 10 ^ 5)\) 个点的带权树, \(m~(m \le 3 \times 10 ^ 5)\) 条路径。求某条边权值变为 \(0\) 后,所有路径长度的最大值,所有边这样搞的最小值。 做法:最小的最大,二分答案。二分最大 阅读全文
posted @ 2022-06-03 08:59 Faker_yu 阅读(30) 评论(0) 推荐(0)
摘要: 洛谷P5283 异或粽子 题意:给出长为 \(n~(n \le 5 \times 10^5)\) 序列,显然有 \(\frac{n \times (n + 1)}{2}\) 个区间。求区间异或和前 \(k~(k \le min(\frac{n \times(n - 1)}{2},2 \times 1 阅读全文
posted @ 2022-06-03 08:40 Faker_yu 阅读(48) 评论(0) 推荐(0)