上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 原题: Description Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex coverproblem very interesting. Supp 阅读全文
posted @ 2016-07-13 21:41 Shawn_Ji 阅读(280) 评论(1) 推荐(1) 编辑
摘要: 原题: Description Mike and !Mike are old childhood rivals, they are opposite in everything they do, except programming. Today they have a problem they c 阅读全文
posted @ 2016-07-13 10:56 Shawn_Ji 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 原题: Description Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him an interesting geometry problem. Let's define f([l 阅读全文
posted @ 2016-07-13 10:45 Shawn_Ji 阅读(149) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/TenosDoIt/p/3453089.html#b 线段树的思想是 将一整个区间二分拆成多个不重合的2段区间,知道不能拆分为止。 例如对于数组[2, 5, 1, 4, 9, 3]可以构造如下的二叉树(背景为白色表示叶子节点,非叶子节点的值是其对应数组区 阅读全文
posted @ 2016-07-12 20:44 Shawn_Ji 阅读(1248) 评论(0) 推荐(0) 编辑
摘要: RMQ算法适合求解对一个数组多次查询给定范围内的最值。 预处理操作: 令d[i,j]表示从i开始,长度为2^j的一段元素的最值,可以用递推公式写出d[i,j] = min{ d[i][j-1], d[ i+2^(j-1) ][j-1] } 原理如图所示: 复杂度:因为2^j<=n, 所以d数组的元素 阅读全文
posted @ 2016-07-12 19:13 Shawn_Ji 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 原题: Description While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap repla 阅读全文
posted @ 2016-07-11 21:06 Shawn_Ji 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 原题: Description Recently, Mike was very busy with studying for exams and contests. Now he is going to chill a bit by doing some sight seeing in the ci 阅读全文
posted @ 2016-07-11 20:28 Shawn_Ji 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 原题: 原题: Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving swee 阅读全文
posted @ 2016-07-11 20:09 Shawn_Ji 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题意: 这道英文题的题意稍稍有点复杂。 找长度为n的数字序列有多少种。这个序列可以分为n/k段,每段k个数字。k个数可以变成一个十进制的数Xi。要求对这每n/k个数,剔除Xi可被ai整除的情况,剔除X的第一个数(包括前导0)是bi的情况。问剩下的组合有多少种。 思路: 这题我是一波三折的。首先也没有 阅读全文
posted @ 2016-05-29 15:42 Shawn_Ji 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题意:给你很多对数,要么是0要么是1。不全0则ans++。 思路即题意。 阅读全文
posted @ 2016-05-29 15:14 Shawn_Ji 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页