上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页
摘要: 点分治裸题 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 阅读全文
posted @ 2018-01-07 20:02 poorpool 阅读(86) 评论(0) 推荐(0) 编辑
摘要: "参考博文" 带一点容斥的思想 cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[20005]; int n, k, uu, vv, ww, cnt, sze, 阅读全文
posted @ 2018-01-04 21:42 poorpool 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 把m个师傅拆成n个阶段,考虑每个人选上第某个阶段的某师傅对答案做出的贡献。 参见 "这里" 与 "那里" 。 cpp include include include include using namespace std; int m, n, uu, cnt, hea[605], ss, tt, m 阅读全文
posted @ 2018-01-04 09:27 poorpool 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 排序枚举左端点,则右端点必定不降 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, 阅读全文
posted @ 2018-01-04 08:45 poorpool 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 纪念一下独立AC紫题。 最近在学树剖,就忘了差分了……所以效率比较低 cpp include include using namespace std; int n, uu, vv, a[300005], hea[300005], dep[300005], gnd[300005][21], qwq; 阅读全文
posted @ 2018-01-03 20:46 poorpool 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 莫队裸题还不带修改 cpp include include include include using namespace std; int n, m, qcnt, ans, col[1000005], bse, blc[50005], a[50005], qwq[200005]; struct Q 阅读全文
posted @ 2018-01-03 19:23 poorpool 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 莫队算法模板 推荐阅读 "这篇博客" cpp include include include include using namespace std; int n, m, bse, blc[10005], a[10005], qCnt, cCnt, qwq[10005], ans=0; int cn 阅读全文
posted @ 2018-01-03 19:02 poorpool 阅读(175) 评论(5) 推荐(0) 编辑
摘要: 题解参照 "这里" 每个研究完记得乘一个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 阅读全文
posted @ 2018-01-03 11:41 poorpool 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 要想限制流量,总要想着拆点。 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 阅读全文
posted @ 2018-01-03 08:28 poorpool 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 单调队列+二分答案 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, 阅读全文
posted @ 2018-01-02 22:03 poorpool 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页