Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
113129 | 陈家宝 | 二叉树问题 | C++ | 通过 | 100 | 0 MS | 244 KB | 319 | 2023-12-01 13:33:43 |
#include <bits/stdc++.h> using namespace std; const int N=25+10; const int INF=0x3f3f3f3f; long long a[N]={}; int main() { int n; a[0]=1; a[1]=1; a[2]=2; for(int i=3;i<=26;i++) { for(int j=0;j<i;j++) { a[i]+=a[j]*a[i-j-1]; } } while(cin>>n) { cout<<a[n]<<endl; } return 0; }