'commit'
This commit is contained in:
16
TangDou/AcWing/Math/ZhuHeJiShu/P1754.cpp
Normal file
16
TangDou/AcWing/Math/ZhuHeJiShu/P1754.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user