摘要: 点双连通分量 #include <bits/stdc++.h> #define sz(a) int((a).size()) #define FOR(i, l, r) for(int i = l; i <= r; i++) #define ROF(i, r, l) for(int i = r; i > 阅读全文
posted @ 2024-07-10 13:18 SegmentTree 阅读(4) 评论(0) 推荐(1) 编辑
摘要: const db pi = acos(-1); struct com { db x, y; com() {x = y = 0; } com(db _x, db _y) {x = _x, y = _y; } com(db r) { x = cos(r), y = sin(r); } friend co 阅读全文
posted @ 2022-01-01 19:49 SegmentTree 阅读(41) 评论(0) 推荐(0) 编辑
摘要: https://xyix.github.io/posts/?searchfor=%E4%BF%9D%E5%BA%8F%E5%9B%9E%E5%BD%92&postname=isotonic-regression https://github.com/enkerewpo/OI-Public-Libra 阅读全文
posted @ 2021-12-26 16:13 SegmentTree 阅读(74) 评论(0) 推荐(0) 编辑
摘要: \(-\min\left\{\sum_{u}b_up_u+ \sum_{u, v}c_{u,v}max(0,p_v-p_u-w_{u,v})\right\}\) orz orz 阅读全文
posted @ 2021-12-25 10:58 SegmentTree 阅读(41) 评论(0) 推荐(0) 编辑
摘要: const int P = 998244353; int power(int a, int b, int c = 1) { for(; b; b >>= 1, a = (ll)a * a % P) if(b & 1) c = (ll)c * a % P; return c; } struct min 阅读全文
posted @ 2021-12-10 08:16 SegmentTree 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 三维凸包(已经忘光了 #include <bits/stdc++.h> using namespace std; typedef double db; const int N = 2100; const db eps = 1e-9; int n; int vis[N][N]; db Ran() { 阅读全文
posted @ 2021-08-04 16:21 SegmentTree 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 想证明的东西一定要尝试验证是不是对的,可以尝试卡 证明 定义优先级按$deg$比较, 相同比编号, 然后大往小连边 对于任意的点$u$, \(in_u \leq \sqrt m\) 所以, 我们枚举$u$点, 再枚举他的下一个$v \leq u$点, 再枚举下一个$w \leq v$点 每一个点的贡 阅读全文
posted @ 2020-11-22 20:43 SegmentTree 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 我好像只过了模板题 感觉很迷 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 4e5 + 10; const int mod = 1e9 + 7; const int iv2 = 500 阅读全文
posted @ 2020-11-08 20:53 SegmentTree 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 就是把拓扑图变成变成一棵树然后高度压缩一下,就变成了灭绝树 #include<bits/stdc++.h> #define debug(x) cerr << #x <<" = " << x << endl using namespace std; const int N = 2e6 + 10; co 阅读全文
posted @ 2020-10-03 11:12 SegmentTree 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #神仙的博客 阅读全文
posted @ 2020-07-12 20:36 SegmentTree 阅读(13) 评论(0) 推荐(0) 编辑