上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 36 下一页
摘要: 11日 luogu T21778 hdu 6155 12日 luogu 3380 13日 luogu 3415 luogu 4093 15日 luogu 3593 17日 luogu 3959 19日 luogu 3960 20日 luogu 1955 poj 1456 21日 poj 1733 2 阅读全文
posted @ 2018-02-11 10:32 poorpool 阅读(124) 评论(0) 推荐(0)
摘要: treap。树是以“优先级”(优先级越小,在书架上越靠上)形成的,堆是以rand()的权值形成的。还要再维护一个原编号。 置顶/置底:找到那个元素,把它拉出来修改优先级再塞回去。 insert:即一个元素和他“附近”的元素交换位置,把他们两个拉出来,交换优先级再塞回去 cpp include inc 阅读全文
posted @ 2018-01-30 09:44 poorpool 阅读(147) 评论(0) 推荐(0)
摘要: 先满足挑剔的 cpp include include include include using namespace std; typedef long long ll; int n, m, tmp, rot, cnt; ll ans; struct Cow{ int pri, gre; }cow[ 阅读全文
posted @ 2018-01-30 08:04 poorpool 阅读(201) 评论(0) 推荐(0)
摘要: treap水过 cpp include include include using namespace std; int n, uu, rot, cnt, sum=0, ans1, ans2; const int oo=2147483647; struct Treap{ int val[35005] 阅读全文
posted @ 2018-01-29 15:04 poorpool 阅读(137) 评论(0) 推荐(0)
摘要: 学校linux机子根本跑不动libreoffice,wps没有公式,只好上LaTeX了。 先 beamer: 需要安装firasans和firamono字体,思源黑体SC \documentclass[10pt]{beamer} \usetheme[progressbar=frametitle]{m 阅读全文
posted @ 2018-01-27 18:43 poorpool 阅读(831) 评论(0) 推荐(0)
摘要: 参考文章 "无源汇有上下界的可行流" "有源汇有上下界的最大流" "有源汇有上下界的最小流" 无源汇有上下界可行流 以 loj115 为例。 剥离出必要边与自由边。 cpp include include include include using namespace std; int n, m, 阅读全文
posted @ 2018-01-26 16:24 poorpool 阅读(295) 评论(0) 推荐(0)
摘要: "参考" 阅读全文
posted @ 2018-01-25 20:23 poorpool 阅读(127) 评论(0) 推荐(0)
摘要: 考虑暴力,答案显然是 $\sum_{i=1}^n\sum_{j=1}^m(2(\gcd(i,j) 1)+1)=\sum_{i=1}^n\sum_{j=1}^m(2\gcd(i,j) 1)$。 考虑优化,设 $f(i)$ 是 $\gcd(x,y) = i$ 的点的个数,则 $\sum_{i=1}^{\ 阅读全文
posted @ 2018-01-25 18:43 poorpool 阅读(109) 评论(0) 推荐(0)
摘要: 先二分一下变成判定性问题。 在 $1 \ldots n$ 内,所有的没有平方因子的数的个数是: $$n \frac{n}{2^2} \frac{n}{3^2} \cdots + \frac{n}{(2 \times 3)^2} + \cdots $$ 惊奇地发现也就是 $$\sum_{k=1}^{\ 阅读全文
posted @ 2018-01-25 16:27 poorpool 阅读(145) 评论(0) 推荐(0)
摘要: 莫比乌斯反演练习题。 cpp include include include using namespace std; typedef long long ll; int T, b, d, a, c, k, mu[100005], pri[100005], cnt; bool isp[100005] 阅读全文
posted @ 2018-01-25 15:06 poorpool 阅读(171) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 36 下一页