摘要: 这个题,要用到错排递推公式,还有全排。 还有,最近比赛啥的老是不爽,结果通过这个题竟然发现了自己的毛病,printf(“%lf”)输出double型怎么弄也是输出0.00,调试了半天,还以为C语言编译器犯病了。后来才知道输出时应该用f,无语了。发现自己太水了。。。好好努力吧。。 #inclu... 阅读全文
posted @ 2014-12-20 22:37 Popco 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Problem Description Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Prince... 阅读全文
posted @ 2014-12-20 09:23 Popco 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem Description Fibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。 Input 输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。 ... 阅读全文
posted @ 2014-12-20 09:05 Popco 阅读(143) 评论(0) 推荐(0) 编辑