讨论 / 晕 不知道为什么我写了个程序 结果AC了 原理自己都不懂。。。
w7x7t772007 2013-09-17 06:22:00
点我顶贴 收藏 删除
var

i,j,s,n:longint;

a:array[0..200] of longint;

begin

readln(n);

a[0]:=1;

for i:=1 to n do

begin

for j:=1 to i do

begin

a[i]:=a[i-j]*a[j-1]+a[i];

end;

end;

writeln(a[n]);

end.

PASCAL 这个程序实现了求第N项的通项公式。。

100分 [我要评价一下题目~]

提交日期: 2012-5-19 13:48:00

有效耗时: 1688毫秒

测试结果1: 通过本测试点|有效耗时188ms

测试结果2: 通过本测试点|有效耗时156ms

测试结果3: 通过本测试点|有效耗时172ms

测试结果4: 通过本测试点|有效耗时156ms

测试结果5: 通过本测试点|有效耗时172ms

测试结果6: 通过本测试点|有效耗时156ms

测试结果7: 通过本测试点|有效耗时157ms

测试结果8: 通过本测试点|有效耗时172ms

测试结果9: 通过本测试点|有效耗时156ms

测试结果10: 通过本测试点|有效耗时203ms

提交代码:

#1 yu990601@2012-05-20 03:37:00
回复 删除
那题啊

那题啊

#2 995541152@2012-06-01 23:17:00
回复 删除
注意了,这表明你RP消耗了

套答案套对了,你要记得最近要多攒攒RP了

#3 gzyxs@2012-07-16 20:24:00
回复 删除
你的RP爆棚了

小心最近有倒霉的事

#4 GUA@2013-09-17 06:22:00
回复 删除
我一开始就那样想的

依次从i=1到n,已经把f[i-1]和f[n-i-1]算出来了嘛,那么先把i左边移过去有f[i-1]种,在把第i位移过去,在把右边的移过去有f[n-i-1],所以,第i位有f[i-1]*f[n-i-1]这么多种,再累加就对了

#5 lla-leo@2017-02-15 02:57:22
回复 删除
你现在666666666666666666666666666

不要过一会儿就55555555555555555555555

RP值不会一直有

查看更多回复
提交回复