2018年10月6日

[NOI2012]随机数生成器

摘要: 题意 栋栋最近迷上了随机算法,而随机数是生成随机算法的基础。栋栋准备使用线性同余法(Linear Congruential Method)来生成一个随机数列,这种方法需要设置四个非负整数参数m,a,c,X[0],按照下面的公式生成出一系列随机数{Xn}: X[n+1]=(aX[n]+c) mod m 阅读全文

posted @ 2018-10-06 20:29 autoint 阅读(227) 评论(0) 推荐(0) 编辑

test20181006 投票

摘要: 题意 分析 考场30分 枚举大小为k的子集的算法终于用上了。 时间复杂度 $$O\left(\binom{n}{k} \cdot \binom {k}{\frac{k}{2}} \cdot k\right)$$ cpp include include include include include 阅读全文

posted @ 2018-10-06 15:59 autoint 阅读(195) 评论(0) 推荐(0) 编辑

test20181006 石头剪刀布

摘要: 题意 分析 考场做法同题解一样。 std代码。 我的代码。排序的时候我用的递推处理,跑得比std快。 cpp include include include include include include include include include include include include 阅读全文

posted @ 2018-10-06 14:53 autoint 阅读(192) 评论(0) 推荐(0) 编辑

LG2731 骑马修栅栏 Riding the Fences

摘要: 欧拉回路模板题 阅读全文

posted @ 2018-10-06 07:53 autoint 阅读(145) 评论(0) 推荐(0) 编辑

导航