上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页
摘要: 我们想知道 $2^{2^{2^\cdots}}\mod p$。 考虑用扩展欧拉定理降幂, $$2^{2^{2^\cdots}}\equiv 2^{(2^{2^\cdots}\mod \varphi(p))+\varphi(p)}\mod p. $$ 于是定义$f(p)=2^{2^{2^\cdots} 阅读全文
posted @ 2017-12-29 10:01 poorpool 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 扩展欧拉定理: $$ a^x \equiv a^{x\mathrm{\ mod\ }\varphi(p) + x \geq \varphi(p) ? \varphi(p) : 0}(\mathrm{\ mod\ }p)$$ cpp include include include using name 阅读全文
posted @ 2017-12-28 21:58 poorpool 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 发现好像没人来证明贪心啊……那我来写一下它的证明 欲证明:放一个数在已有的柱上(如果可以)总是比新开一个柱更优的 假如已经放了 现在我要放 我有两种策略 在 (`xu xx`组成完全平方数的数)上放,或者新开一个柱子 即 or 然后再考虑 对于 ,上下两种都是一样的,就不说了 既然 可以与 组成完全 阅读全文
posted @ 2017-12-28 15:29 poorpool 阅读(138) 评论(0) 推荐(0) 编辑
摘要: $$\sum a_i x\times \sum b_i $$ 等同于 $$ \sum(a_i x \times b_i) $$ 阅读全文
posted @ 2017-12-28 09:05 poorpool 阅读(99) 评论(1) 推荐(0) 编辑
摘要: 最小路径覆盖, "看这里" cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[15005]; int n, m, hea[305], ss, tt, uu, v 阅读全文
posted @ 2017-12-27 21:23 poorpool 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 倘若某个试题已经被选到某个类型里了,那么它就不可再被选进别的类型了。 所以,对于每个类型,我们将其与汇连边,权值是它的要求的题目数量。 对于每个题目,我们将源与其连边,权值是1,代表只能用一次。然后再将其与它所对应的所有类型连边。 倘若最大流小于m,则说明不能组卷。 输出路径我觉得还是比较好做的,对 阅读全文
posted @ 2017-12-27 10:59 poorpool 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 最大权闭合子图 参考 "这" ,胡伯涛论文。 10,8,6,3这个简单割对应的闭合子图是A1,B1,B2 输出路径时,最后一次层次图中,与源点相连的点即选做的实验,与汇点相连的点即选用的仪器。 cpp include include include include using namespace s 阅读全文
posted @ 2017-12-27 08:38 poorpool 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 状压最短路 cpp include include include include using namespace std; struct Node{ int bi1, bi2, fi1, fi2; }nd[105]; int n, m, ww[105], cnt, dis[1050005]; bo 阅读全文
posted @ 2017-12-26 10:02 poorpool 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 源向地球连 月球向汇连 每一天往下一天连 飞船上一天与这一天连 枚举答案 cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[1000005]; int n, m 阅读全文
posted @ 2017-12-26 08:36 poorpool 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 网络流不用动脑子的好爽啊 cpp include include include include using namespace std; int n, uu, hea[105], cnt, ss, tt, sum, minCost, pre[105], dis[105]; const int oo 阅读全文
posted @ 2017-12-25 21:12 poorpool 阅读(99) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页