Files
python/TangDou/AcWing/Math/ZhuHeJiShu/P1754.cpp

16 lines
315 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 30;
LL f[N];
int main() {
int n;
cin >> n;
f[0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= i; j++)
f[i] += f[j - 1] * f[i - j];
cout << f[n] << endl;
return 0;
}