摘要:
"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 阅读全文
摘要:
"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, 阅读全文
摘要:
做了 [JSOI2008]Blue Mary开公司 以后发现这 tm 不就是个傻逼树剖+李超线段树吗,做了以后发现我才是傻逼……树剖竟然写错了……这题是我目前写过最长的代码了qwq cpp include include using namespace std; typedef long long 阅读全文
摘要:
跑最大费用最大流,注意到每次 spfa 出来的 cost 一定是越来越少的,啥时小于 $0$ 了就停了吧。 cpp include include include include using namespace std; typedef long long ll; int n, a[205], b[ 阅读全文
摘要:
定义区间是内部只含有乘号的区间。 对于区间左端点是 $l \geq 2$ 的情况,左端点前头是加号的情况和前头是减号的情况的个数是相同的。因此这些区间不对答案产生贡献。 所以区间左端点必定是 $1$。当 $r=n$ 时,这个区间产生一次贡献。当 $r include include using na 阅读全文
摘要:
矩阵树定理+模意义下整数高斯消元 cpp include include include include include using namespace std; typedef long long ll; typedef pair pii; int n, uu, vv, ww, w[21][21] 阅读全文