上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 36 下一页
摘要: "ref" cpp include include include using namespace std; int nn, n, rnk[60005], tmp[60005], cnt[60005], m=128, p, saa[60005]; char s[15], ss[60005]; voi 阅读全文
posted @ 2018-04-23 19:35 poorpool 阅读(111) 评论(0) 推荐(0) 编辑
摘要: "ref" cpp include include include include using namespace std; typedef long long ll; int n, m, a[2005], b[2005]; ll dp[2005][2005]; ll f(){ memset(dp, 阅读全文
posted @ 2018-04-22 20:42 poorpool 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 越靠近叶子越优先删掉 阅读全文
posted @ 2018-04-21 10:28 poorpool 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 做了 [JSOI2008]Blue Mary开公司 以后发现这 tm 不就是个傻逼树剖+李超线段树吗,做了以后发现我才是傻逼……树剖竟然写错了……这题是我目前写过最长的代码了qwq cpp include include using namespace std; typedef long long 阅读全文
posted @ 2018-04-21 09:24 poorpool 阅读(221) 评论(0) 推荐(0) 编辑
摘要: "ref" 好像叫什么李超线段树?……这篇不是太通用…… 阅读全文
posted @ 2018-04-20 15:13 poorpool 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 跑最大费用最大流,注意到每次 spfa 出来的 cost 一定是越来越少的,啥时小于 $0$ 了就停了吧。 cpp include include include include using namespace std; typedef long long ll; int n, a[205], b[ 阅读全文
posted @ 2018-04-20 09:42 poorpool 阅读(200) 评论(0) 推荐(0) 编辑
摘要: "ref" "ref" 一个点就是一个数对 $(x,y)$。 记状态 $f[i][1/0][1/0][1/0]$ 和 $g[i][1/0][1/0][1/0]$,其中三个 $1/0$ 取值分别代表“$x$ 在前 $i$ 位卡满 $n$(的前 $i$ 位)/小于它”、“$y$ 在前 $i$ 位卡满 $ 阅读全文
posted @ 2018-04-19 21:37 poorpool 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 定义区间是内部只含有乘号的区间。 对于区间左端点是 $l \geq 2$ 的情况,左端点前头是加号的情况和前头是减号的情况的个数是相同的。因此这些区间不对答案产生贡献。 所以区间左端点必定是 $1$。当 $r=n$ 时,这个区间产生一次贡献。当 $r include include using na 阅读全文
posted @ 2018-04-19 16:57 poorpool 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 矩阵树定理+模意义下整数高斯消元 cpp include include include include include using namespace std; typedef long long ll; typedef pair pii; int n, uu, vv, ww, w[21][21] 阅读全文
posted @ 2018-04-19 16:05 poorpool 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 欲学矩阵树定理~~必先自宫~~学习 "一些行列式的姿势" 然后 "做一道例题" 阅读全文
posted @ 2018-04-19 15:24 poorpool 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 36 下一页