首页 > 其他分享 >P1044 [NOIP2003 普及组] 栈

P1044 [NOIP2003 普及组] 栈

时间:2024-09-13 11:51:22浏览次数:1  
标签:普及 return NOIP2003 int typedef long vector P1044 vx

include<bits/stdc++.h>

using namespace std;

define x first

define y second

typedef pair<int,int> PII;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef vector VS;
typedef vector VI;
typedef vector<vector> VVI;
vector vx;
inline int mp(int x) {return upper_bound(vx.begin(),vx.end(),x)-vx.begin();}
inline int log_2(int x) {return 31-__builtin_clz(x);}
inline int popcount(int x) {return __builtin_popcount(x);}
inline int lowbit(int x) {return x&-x;}
const int N = 1001;
ll C[N][N];
void init_C()
{
for(int i=0;i<N;++i) C[i][0] = 1;
for(int i=1;i<N;++i)
for(int j=1;j<=i;++j)
{
C[i][j] = C[i-1][j] + C[i-1][j-1];
}
}
void solve()
{
init_C();
int n;
cin>>n;
cout<<C[2*n][n]/(n+1)<<'\n';
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int T = 1;
//cin>>T;
while(T--)
{
solve();
}
}

标签:普及,return,NOIP2003,int,typedef,long,vector,P1044,vx
From: https://www.cnblogs.com/ruoye123456/p/18411943

相关文章