上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 1、hdu 2204 Eddy's爱好 知识点:1、容斥原理 2、由 n^(1/p) ,就可以知道在小于等于 n 的数字中,指数为p的有多少个 (其中包括 1^p 这种类型的) 3、10^18 < 2^62 方法:通过观察,可以发现若一个数可以表示成x^(k*t),则可以表示成(x^k)^t。 根据 阅读全文
posted @ 2016-11-11 15:50 邻家那小孩儿 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1、hdu 1796 How many integers can you find 容斥典型问题:求在给定区间内,能被给定集合至少一个数整除的数个数 方法:将给出的n个整除的数进行二进制枚举(2^n),计算ai所能组成的各种集合(这里将集合中ai的最小公倍数作为除数)在区间中满足的数的个数,然后利用 阅读全文
posted @ 2016-11-08 13:10 邻家那小孩儿 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 整除规则第一条(1):任何数都能被1整除。 整除规则第二条(2):个位上是2、4、6、8、0的数都能被2整除。 整除规则第三条(3):每一位上数字之和能被3整除,那么这个数就能被3整除。 整除规则第四条(4):最后两位能被4整除的数,这个数就能被4整除。 整除规则第五条(5):个位上是0或5的数都能 阅读全文
posted @ 2016-11-02 22:56 邻家那小孩儿 阅读(705) 评论(0) 推荐(0) 编辑
摘要: 指数型母函数主要是关于排列组合方面的问题。 分别看两个比较典型的问题对比: 普通母函数问题: 有红球两个,白球、黄球各一个,试求有多少种不同的组合方案。 指数型母函数问题:假设有8个元素,其中a1重复3次,a2重复2次,a3重复3次。从中取r个组合,求其组合数。 对于上面的问题“假设有8个元素,其中 阅读全文
posted @ 2016-11-01 12:20 邻家那小孩儿 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Description We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in 阅读全文
posted @ 2016-10-30 20:59 邻家那小孩儿 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all 阅读全文
posted @ 2016-10-30 20:11 邻家那小孩儿 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "The second problem is, give 阅读全文
posted @ 2016-10-30 19:53 邻家那小孩儿 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 一、问题 有N男N女,每个人都按照他对异性的喜欢程度排名。现在需要写出一个算法安排这N个男的、N个女的结婚,要求两个人的婚姻应该是稳定的。 何为稳定? 有两对夫妻M1 F2,M2 F1。M1心目中更喜欢F1,但是他和F2结婚了,M2心目中更喜欢F2,但是命运却让他和F1结婚了,显然这样的婚姻是不稳定 阅读全文
posted @ 2016-10-30 15:41 邻家那小孩儿 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: Description Bizon the Champion isn't just a bison. He also is a favorite of the "Bizons" team. At a competition the "Bizons" got the following problem 阅读全文
posted @ 2016-09-28 17:36 邻家那小孩儿 阅读(167) 评论(0) 推荐(0) 编辑
摘要: A. Rewards A. Rewards Bizon the Champion is called the Champion for a reason. Bizon the Champion has recently got a present — a new glass cupboard wit 阅读全文
posted @ 2016-09-28 11:33 邻家那小孩儿 阅读(143) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页