做了一个蒟蒻题,然后不知道代码死在了哪里,劳烦各位大佬帮忙看看
#include<bits/stdc++.h>
#define endl "\n"
using namespace std;
const long long mod=1000000009;
int qpow(int a,int b)
{
if(b==1||b==0)return a;
if(b%2==1)return qpow(a*a%mod,b/2)*a;
return qpow(a*a%mod,b/2);
}
int a,b;
int f[1000001];
int main()
{
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
cin>>a>>b;
f[0]=qpow(2,a);
for (int i = 1;i<=b;i++)
{
f[i]=(f[i-1]*(a+1-i))%mod/(2*i%mod);
}
cout<<f[b];
return 0;
exit(0);
}