标签:span primary stream clipboard Edito class one 内存 amp
时间限制:1 Sec 内存限制:256 MiB
提交:428 答案正确:102
3 5
1 5
1 #include <iostream> 2 #include<stdio.h> 3 #include<string.h> 4 #include<string> 5 #include<algorithm> 6 #define ll long long 7 using namespace std; 8 #define N 100 9 ll dp[40]; 10 11 int main() 12 { 13 ll n; 14 dp[1]=1ll; 15 dp[2]=2ll; 16 for(int i=3;i<=27;i++){ 17 dp[i]=2ll*(2ll*i-1ll)*dp[i-1]/(i+1ll); 18 } 19 20 while(scanf("%lld",&n)!=EOF){ 21 printf("%lld\n",dp[n-2]); 22 } 23 24 return 0; 25 }
ZZNU-OJ-2119 : 告辞,【卡特兰数列,组合数学】
标签:span primary stream clipboard Edito class one 内存 amp
原文地址:https://www.cnblogs.com/zhazhaacmer/p/9364527.html