2017年6月6日

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=10010; 6 #define lson l,m,rt>1; 14 // if(num==x[m]) return m; 15 // if(num>x[m]) return trans(num,m+1,r); ... 阅读全文
posted @ 2017-06-06 20:21 缄默火 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 在切诺夫界的证明中用到了Markov不等式,证明于此~顺便把Chebyshev不等式也写上了 阅读全文
posted @ 2017-06-06 20:19 缄默火 阅读(686) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-06 19:54 缄默火 阅读(11193) 评论(1) 推荐(0) 编辑

2017年5月31日

摘要: 在Miller-Rabin素数测试的正确性证明里使用过~证明于此。 阅读全文
posted @ 2017-05-31 15:51 缄默火 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 在Miller-Rabin素数测试的正确性证明里使用过~证明于此。 阅读全文
posted @ 2017-05-31 15:47 缄默火 阅读(1372) 评论(0) 推荐(0) 编辑

2017年5月28日

摘要: 从Byvoid大神博客那里拿到的好题和数据~在此鸣谢。 问题描述: 第二次世界大战时期,英国皇家空军从沦陷国征募了大量外籍飞行员。由皇家空军派出的每一架飞机都需要配备在航行技能和语言上能互相配合的2 名飞行员,其中1 名是英国飞行员,另1 名是外籍飞行员。在众多的飞行员中,每一名外籍飞行员都可以与其 阅读全文
posted @ 2017-05-28 22:43 缄默火 阅读(2629) 评论(0) 推荐(0) 编辑
摘要: Description Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new probl 阅读全文
posted @ 2017-05-28 22:26 缄默火 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题意大致为找同性恋的虫子。。。。 这个比食物链要简单些。思路完全一致,利用取余操作实现关系之间的递推。 个人感觉利用向量,模和投影可能可以实现具有更加复杂关系的并查集。 1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 阅读全文
posted @ 2017-05-28 22:00 缄默火 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 食物链是并查集的进阶运用的一道非常经典的题目。 题目如下: 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描 阅读全文
posted @ 2017-05-28 21:54 缄默火 阅读(172) 评论(0) 推荐(0) 编辑

2017年5月7日

摘要: 我在RSA学习总结的第三部分关于Mille-Rabin素数测试的正确性证明里需要用到此定理,由于证明太长,故另开一章于此。(为啥我说话突然文绉绉了Orz,可能是这周辩论打多了) 结论是对素数p,modulo p的原根存在,个数为与ø(p-1),modulo p2的原根个数为(p-1)ø(p-1)个 阅读全文
posted @ 2017-05-07 21:26 缄默火 阅读(5024) 评论(0) 推荐(1) 编辑

导航