# [BZOJ2839]集合计数

Description

Input

Output

Sample Input
3 2

Sample Output
6

HINT
【样例说明】

【数据说明】

/*program from Wolfycz*/
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define inf 0x7f7f7f7f
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
inline char gc(){
static char buf[1000000],*p1=buf,*p2=buf;
}
inline int frd(){
int x=0,f=1; char ch=gc();
for (;ch<'0'||ch>'9';ch=gc())	if (ch=='-')	f=-1;
for (;ch>='0'&&ch<='9';ch=gc())	x=(x<<3)+(x<<1)+ch-'0';
return x*f;
}
int x=0,f=1; char ch=getchar();
for (;ch<'0'||ch>'9';ch=getchar())	if (ch=='-')	f=-1;
for (;ch>='0'&&ch<='9';ch=getchar())	x=(x<<3)+(x<<1)+ch-'0';
return x*f;
}
inline void print(int x){
if (x<0)	putchar('-'),x=-x;
if (x>9)	print(x/10);
putchar(x%10+'0');
}
const int N=1e6,p=1e9+7;
int fac[N+10],inv[N+10],g[N+10];
void prepare(){
fac[0]=inv[0]=inv[1]=g[0]=1;
for (int i=1;i<=N;i++)	g[i]=2ll*g[i-1]%(p-1);
for (int i=1;i<=N;i++)	fac[i]=1ll*fac[i-1]*i%p;
for (int i=2;i<=N;i++)	inv[i]=1ll*(p-p/i)*inv[p%i]%p;
for (int i=1;i<=N;i++)	inv[i]=1ll*inv[i-1]*inv[i]%p;
}
int C(int n,int m){return 1ll*fac[n]*inv[m]%p*inv[n-m]%p;}
int mlt(int a,int b){
int res=1;
for (;b;b>>=1,a=1ll*a*a%p)	if (b&1)	res=1ll*res*a%p;
return res;
}
int main(){
prepare();