水题,要么卡特兰数,要么递推,反正都能过(记得int64)
var f:Array[-400..400] of int64; n,i,j:longint; begin readln(n); f[0]:=1; f[1]:=1; for i:=2 to n do for j:=0 to i-1 do f[i]:=f[i]+f[j]*f[i-1-j]; writeln(f[n]); end.
喜欢就收藏一下,vic私人qq:1064864324,加我一起讨论问题,一起进步^-^