
数论
野生的声威
这个作者很懒,什么都没留下…
展开
-
Catalan数计算及应用
问题描述:卡塔兰数,是组合数学中一个常出现在各种计数问题中出现的数列。输入一个整数n,计算h(n)。其递归式如下:h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)h(0) (其中n>=2,h(0) = h(1) = 1) 该递推关系的解为:h(n)=C(2n,n)/(n+1) (n=1,2,3,...)思路:直接根据递归式,写出相应的算法。转载 2014-08-03 20:43:49 · 507 阅读 · 0 评论 -
zoj3405 卡特兰数
Counting Factor TreesTime Limit: 2 Seconds Memory Limit: 65536 KB Factoring, i.e., listing all the prime factors, of an integer is a useful skill that often helps to solve math problems. F原创 2014-08-03 23:05:25 · 698 阅读 · 0 评论 -
zoj3547
The Boss on MarsTime Limit: 2 Seconds Memory Limit: 65536 KB On Mars, there is a huge company called ACM (A huge Company on Mars), and it’s owned by a younger boss.Due to no moons around原创 2014-07-29 13:16:12 · 480 阅读 · 0 评论 -
zoj3529
A Game Between Alice and BobTime Limit: 5 Seconds Memory Limit: 262144 KB Alice and Bob play the following game. A series of numbers is written on the blackboard. Alice and Bob take turns原创 2014-07-31 23:42:32 · 489 阅读 · 0 评论 -
求n以内的所有因子数
本原创 2014-07-31 21:14:58 · 2714 阅读 · 0 评论