topcoder srm363(2007-08-12 11:31)
来源:互联网 发布:数据可视化编程 编辑:程序博客网 时间:2024/06/04 17:53
由于开赛前跟小用讨论了同样的题目, 结果250比较快出了, RP好啊, rating大升~
给出圆上偶数个点, 问可以有几种方法不相交地连线.
除了直接DP, 可以用公式C(n, n/2)/(n/2+1), 先把组合数先算出来就OK.
-
递归公式是w(n)=w(0)*w(n-2)+w(2)*w(n-4)+......+w(n-2)*w(0) w(0)=1
-
以点对为单为就是w1(n)=w1(0)*w1(n-1)+w1(1)*w1(n-2)+......+w1(n-1)*w1(0) w1(0)=1
-
以1为起点: w2(n+1)=w2(1)*w2(n)+w2(2)*w2(n-1)+......+w2(n)*w2(1) w(1)=1
-
跟下面的catalan数递归公式...
h(n)= h(1)*h(n-1) + h(2)*h(n-2) + ... + h(n-1)h(1) h(1)=1
h(n)=c(2n-2,n-1)/n
h(n)=w2(n)
所以w(n)=w1(n/2)=w2(n/2+1)=h(n/2+1)=C(n, n/2)/(n/2+1)
- topcoder srm363(2007-08-12 11:31)
- topcoder srm 361(2007-08-02 11:20)
- topcoder srm362(2007-08-08 20:28)
- Topcoder srm364(2007-09-05 12:19)
- topcoder srm348(2007-05-10 11:19)
- topcoder srm 353...吃蛋了...(2007-06-08 01:11)
- TopCoder
- topcoder
- Topcoder
- topcoder
- topcoder
- Topcoder
- topcoder srm 359(2007-07-22 11:51)
- topcoder srm350(2007-05-24 15:27)
- topcoder srm351(2007-05-29 21:41)
- topcoder srm352(2007-06-03 20:45)
- topcoder srm357(2007-07-13 17:24)
- topcoder广东省赛(2007-05-26 13:20)
- 我为什么经常去“海内”?
- [双语阅读]经济困境中西方裁员东方减薪 折射文化差异
- ActionScript 3.0 Cookbook [ILLUSTRATED]
- 怎样才能充分利用SQL索引
- 如何应对糟糕的面试官
- topcoder srm363(2007-08-12 11:31)
- 祝福
- 在监控windows资源时出现拒绝访问的错误
- 22岁了...停电了...(2007-08-18 19:09)
- 定点数二进制表示
- TCCC Algo Qual Round 1(2007-08-19 02:59)
- 转个有意思的东西: 脑残体全论(2007-08-20 13:48)
- 自己动手写算法.Sort.QuickSort
- 冬天来了,您准备好了吗?--员工篇