摘要: 纪念一下独立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 阅读(172) 评论(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 阅读(137) 评论(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 阅读(189) 评论(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 阅读(92) 评论(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 阅读(113) 评论(0) 推荐(0)