上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 简单组合博弈模型详解: http://www.cnblogs.com/acm1314/p/4647034.html(1)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。题目:http://acm.hdu.edu.cn/sh... 阅读全文
posted @ 2015-07-13 16:28 草滩小恪 阅读(684) 评论(0) 推荐(0)
摘要: 题目: http://acm.hdu.edu.cn/showproblem.php?pid=1466#include#include#includeusing namespace std;int main(){ int n; int r; //假设有r条非相互平行的线。... 阅读全文
posted @ 2015-07-09 19:09 草滩小恪 阅读(215) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2037(简单贪心-----活动安排)#include#includeusing namespace std;struct Node{ int l, r;}a[105];bool Cmp(Node x, Nod... 阅读全文
posted @ 2015-07-07 23:25 草滩小恪 阅读(178) 评论(0) 推荐(0)
摘要: 钟表问题解决思路:以秒针的转动的角度, 计算分针与时针转过的角度。 即: 模拟现实的场景。《1》http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=607&pid=1001#include#include#include#... 阅读全文
posted @ 2015-07-05 09:23 草滩小恪 阅读(163) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1042题意:Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!是不是很简单呢?一般方法:#include#includeusing ... 阅读全文
posted @ 2015-07-03 17:15 草滩小恪 阅读(185) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1496题意:Consider equations having the following form: a*x1^2+b*x2^2+c*x3^2+d*x4^2=0 a, b, c, d are integer... 阅读全文
posted @ 2015-07-02 22:52 草滩小恪 阅读(185) 评论(0) 推荐(0)
摘要: 题目:http://www.lightoj.com/volume_showproblem.php?problem=1077题意:在平面上, 给出两个点的坐标 例如:(x, y) 其中x, y 都是整数。 求: 以这两个点为端点的线段上一共有几个整数点(即:横纵坐标皆为整数)。解法: 求出|x1 - ... 阅读全文
posted @ 2015-07-02 22:12 草滩小恪 阅读(290) 评论(0) 推荐(0)
摘要: 并查集:N 个不同的元素分布在若干个互不相交集合中,需要进行以下3个操作: 1. 合并两个集合 2. 查询一个元素在哪个集合 3. 查询两个元素是否属于同一集合一般用下面两个模板: int get_par(int a){ if(par[a]!=a) par[a] = get_par(pa... 阅读全文
posted @ 2015-06-23 23:31 草滩小恪 阅读(183) 评论(0) 推荐(0)
摘要: 欧拉函数: phi(n) = n*(1 - 1/p1)*(1 - 1/p2)*...*(1 - 1/pk); p1 p2 ... 为n 的素因子,表示 1 ... n 中 与 n 互质的数的个数推导: 由于符号难写,在此略去。概率解释ex: [1, a] 与 [1, b] 互质对个数 ?来道裸题练习... 阅读全文
posted @ 2015-06-21 09:11 草滩小恪 阅读(173) 评论(0) 推荐(0)
摘要: http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=604&pid=1001问题描述给定一个数 N 把统计它的二进制表示里, 1的块数。 如 5 = 101 有两块 1 。 如 11 = 1011 也是有两块 1 ... 阅读全文
posted @ 2015-06-20 22:15 草滩小恪 阅读(186) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页