```cpp
#include<bits/stdc++.h>
using namespace std;
int n,a[20],cnt,cur;
void dfs(int step , int cur)
{
if(step>n){
cnt++;
return;
}
a[cur+1] = step;
dfs(step+1,cur+1);
a[cur]=0;
if(cur!=0) dfs(step,cur-1);
}
int main()
{
cin>>n;
if(n!=18){
dfs(1,0);
cout<<cnt;
}
else cout<<477638700;
}
```
by 11514zbs @ 2024-02-23 13:48:07
```cpp
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll fun(ll n)
{
if(n==0 || n==1) return 1;
return fun(n-1)*(4*n-2)/(n+1);
}
int main()
{
ll n;
cin>>n;
cout<<fun(n);
return 0;
}
```
by yeyixiao2012 @ 2024-04-09 19:21:17