摘要:
数据结构 线段树 103107A(segmentbeats) 102798G(segmentbeats) 启发式合并 dsu on tree 2019icpc南昌K(dsu on tree+动态开点线段树) 2020ccpc长春F(dsu on tree) 轻重链剖分 HDU6962(轻重链剖分+线 阅读全文
摘要:
A(bzoj1650) #include<bits/stdc++.h> using namespace std; int a[200200]; int l,n,m; int check(int x) { int now = 0; int mi = 0; for(int i = 1;i <= n;i+ 阅读全文
摘要:
最短路(堆优化) #include <bits/stdc++.h> using namespace std; const int inf = 1000000000; void dij() { int n, m, s; cin >> n >> m >> s; vector<vector<pair<in 阅读全文
摘要:
A https://atcoder.jp/contests/abc177/tasks/abc177_c?lang=en #include <bits/stdc++.h> using namespace std; const int P = 1000000007; int main() { ios:: 阅读全文
摘要:
A 枚举一下 #include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int ans = 0; if(x == 1) { ans += 300000; } if(x == 2) { ans 阅读全文