Author: loop3r
Date: 20260224
tag: 递推
link: https://www.luogu.com.cn/problem/P1044问题描述
分析
设
参考代码
cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, h[20] = {1, 1};
cin >> n;
for (int i = 2; i <= n; i++) {
for (int j = 1; j <= i; j++) {
h[i] += h[j - 1] * h[i - j];
}
}
cout << h[n] << endl;
return 0;
}