上一页 1 2 3 4 5 6 7 8 ··· 36 下一页
摘要: "ref" 我是傻逼,我啥也不会,这是我抄的。 cpp include include include using namespace std; int n, a, b, w[55], tot, dy[1005], g[55][55], f[55][55][55][55], va[55]; bool 阅读全文
posted @ 2018-05-22 20:24 poorpool 阅读(343) 评论(0) 推荐(0) 编辑
摘要: "ref" pkusc 快到了,做点 ~~thusc 的~~题涨涨 rp…… cpp include include include include using namespace std; typedef long long ll; int n, k, ch[6000005][10], cnt, 阅读全文
posted @ 2018-05-22 17:11 poorpool 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 一个十进制分数 $p/q$ 在 $b$ 进制下是有限小数的充要条件是 $q$ 的所有质因子都是 $b$ 的质因子。 First, if $p$ and $q$ are not coprime, divide them on $\gcd(p,q)$. Fraction is finite if and 阅读全文
posted @ 2018-05-22 16:09 poorpool 阅读(160) 评论(0) 推荐(0) 编辑
摘要: "ref" 我好菜啊 cpp include include include include using namespace std; int n, u[2005], v[2005], f[2005][11][11][11][11]; int dis(int x, int y){ return ab 阅读全文
posted @ 2018-05-22 14:28 poorpool 阅读(247) 评论(0) 推荐(0) 编辑
摘要: pkusc 快到了……做点题涨涨 rp。 记 $f(S,i)$ 表示 $S$ 这个集合是决计不能选的(要么属于独立集,要么和独立集相连),或称已经考虑了的,$i$ 表示此集合对应的最大独立集大小。那么枚举一下哪些点 $j$ 不在 $S$ 里,记 $w_i$ 表示 $i$ 和与之相邻的点集,则 $f( 阅读全文
posted @ 2018-05-21 20:55 poorpool 阅读(786) 评论(0) 推荐(0) 编辑
摘要: $n=1$ 时特判四角,其余时刻圆的面积和必小于正方形面积,随机点出来判断就行了。 stm 随机算法…… include include include include include using namespace std; int n; double l, xx[15], yy[15]; con 阅读全文
posted @ 2018-05-21 19:04 poorpool 阅读(160) 评论(0) 推荐(0) 编辑
摘要: pkusc 快到了……做点题涨涨 rp。 "ref" 我好菜啊QAQ。 可以发现期望只是一个幌子。我们的目的是:对于所有随机的选择方法(一共 $\binom{2n}{m}$种),这些选择方法都最优地打出 $k$ 张牌,他们能造成的伤害的和是多少。 显然的是,能打强化就打强化(不过你好歹也要攻击一张) 阅读全文
posted @ 2018-05-21 08:43 poorpool 阅读(1116) 评论(2) 推荐(0) 编辑
摘要: pkusc 快到了……做点题涨涨 rp。 初见时 yy 了一个类似于归并的东西,$O(n^2)$,50 分。 50 分 yy 做法 对于一个点,枚举他能到达的权值(假设这个权值在左子树,在右子树是一样的),选上这个点的概率就是“在左子树选上这个点的概率 $\times$ (选择子结点最大值的概率 $ 阅读全文
posted @ 2018-05-20 19:49 poorpool 阅读(464) 评论(0) 推荐(0) 编辑
摘要: "set做法" ~~正解是trie……~~ 主要是要学会 $a\ \mathrm{xor}\ b \leq a+b$ 这种操作 cpp include include include using namespace std; int q, opt, uu, vv, ww; set se[100005 阅读全文
posted @ 2018-05-17 15:29 poorpool 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 分治+最短路,很套路的 cpp include include include include include using namespace std; int n, m, ans[100005], px[20005], py[20005], uu, hea[20005], cnt, q, din; 阅读全文
posted @ 2018-05-17 13:50 poorpool 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 36 下一页