摘要:
点分治裸题 cpp include include using namespace std; int n, uu, vv, ww, ans, cnt, hea[20005], rot, gra[20005], sze, qwq[5]; int siz[20005], gcd; bool vis[20 阅读全文
摘要:
"参考博文" 带一点容斥的思想 cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[20005]; int n, k, uu, vv, ww, cnt, sze, 阅读全文
摘要:
把m个师傅拆成n个阶段,考虑每个人选上第某个阶段的某师傅对答案做出的贡献。 参见 "这里" 与 "那里" 。 cpp include include include include using namespace std; int m, n, uu, cnt, hea[605], ss, tt, m 阅读全文
摘要:
排序枚举左端点,则右端点必定不降 cpp include include include include using namespace std; struct Node{ int pos, val; }nd[1000005]; int n, k, cnt[63], uu, vv=0, rig=0, 阅读全文
摘要:
纪念一下独立AC紫题。 最近在学树剖,就忘了差分了……所以效率比较低 cpp include include using namespace std; int n, uu, vv, a[300005], hea[300005], dep[300005], gnd[300005][21], qwq; 阅读全文
摘要:
莫队裸题还不带修改 cpp include include include include using namespace std; int n, m, qcnt, ans, col[1000005], bse, blc[50005], a[50005], qwq[200005]; struct Q 阅读全文
摘要:
莫队算法模板 推荐阅读 "这篇博客" cpp include include include include using namespace std; int n, m, bse, blc[10005], a[10005], qCnt, cCnt, qwq[10005], ans=0; int cn 阅读全文
摘要:
题解参照 "这里" 每个研究完记得乘一个1/n,这是乘了概率。 cpp include include using namespace std; double dp[105][33005]; int n, k, p[25], d[25], uu; int main(){ cin k n; for(i 阅读全文
摘要:
要想限制流量,总要想着拆点。 cpp include include include include using namespace std; int n, m, ss, tt, uu, vv, ww, maxFlow, minCost, cnt, hea[405], pre[405]; int d 阅读全文
摘要:
单调队列+二分答案 cpp include include include include using namespace std; struct Node{ int x, y; }nd[100005]; int n, d, ans, q1[100005], q2[100005], l1, r1, 阅读全文