07 2017 档案

摘要:A. Unimodal Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Unimodal Array time 阅读全文
posted @ 2017-07-31 21:43 euzmin 阅读(287) 评论(0) 推荐(0)
摘要:A. The Meaningless Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. The Meaningles 阅读全文
posted @ 2017-07-31 16:32 euzmin 阅读(270) 评论(0) 推荐(0)
摘要:dijkstra的代码思想网上各路高手所述备矣。这里只是存下用邻接矩阵和邻接表实现的dijkstra。(白书代码) 邻接矩阵 1 void dijkstra(int s){ 2 int dis[s]=0; 3 while(1){ 4 int v=0; //从尚未使用过的顶点中选择一个距离最小的顶点 阅读全文
posted @ 2017-07-11 10:40 euzmin 阅读(262) 评论(0) 推荐(0)
摘要:堆最重要的性质就是儿子的值一定不小于父亲的值。 堆的push与pop操作的时间复杂度都是O(logn) 堆也是二叉树,所以满足: 左儿子的编号是自己编号*2+1; 右儿子的编号是自己编号*2+2; (左儿子与右儿子没有对应的大小关系) 堆还是很好理解的,能理解树就能理解堆。 附代码: 1 int h 阅读全文
posted @ 2017-07-10 11:22 euzmin 阅读(161) 评论(0) 推荐(0)
摘要:目前遇到需要用快速幂的题,大多都是与取模有关且直接乘会爆数据的题。 因此,在讲快速幂之前,我们得先了解下取模运算。 基本性质 若p|(a-b),则a≡b (% p)。例如 11 ≡ 4 (% 7), 18 ≡ 4(% 7) (a % p)=(b % p)意味a≡b (% p) 对称性:a≡b (% 阅读全文
posted @ 2017-07-04 11:03 euzmin 阅读(229) 评论(0) 推荐(0)
摘要:挑战密室 提交 状态 排名 提交 状态 排名 题目描述 R组织的特工Dr. Kong 为了寻找丢失的超体元素,不幸陷入WTO密室。Dr. Kong必须尽快找到解锁密码逃离,否则几分钟之后,WTO密室即将爆炸。 Dr. Kong发现密室的墙上写了许多化学方程式中。化学方程式,也称为化学反应方程式,是用 阅读全文
posted @ 2017-07-03 10:11 euzmin 阅读(262) 评论(0) 推荐(0)