# [BZOJ2839] 集合计数

3 2

6

### HINT

【样例说明】假设原集合为{A,B,C}则满足条件的方案为：{AB,ABC},{AC,ABC},{BC,ABC},{AB},{AC},{BC}【数据说明】 对于100%的数据，1≤N≤1000000；0≤K≤N；

### 试题分析

#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;
#define LL long long

LL x=0,f=1; char c=getchar();
for(;!isdigit(c);c=getchar()) if(c=='-') f=-1;
for(;isdigit(c);c=getchar()) x=x*10+c-'0';
return x*f;
}
const LL INF = 2147483600;
const LL MAXN = 2000010;
const LL Mod = 1000000007;

LL N,M; LL inv[MAXN+1],fac[MAXN+1],ifac[MAXN+1],Pow[MAXN+1];
inline LL Powl(LL A,LL B){
LL res=1LL; for(; B ; B>>=1,A=A*A%Mod) if(B&1) res=res*A%Mod; return res;
}
inline void init(){
inv[1]=1; fac[1]=1; ifac[1]=1;
for(LL i=2;i<=N;i++) fac[i]=fac[i-1]*i%Mod;
for(LL i=2;i<=N;i++) inv[i]=(Mod-(Mod/i)*inv[Mod%i])%Mod;
for(LL i=2;i<=N;i++) ifac[i]=ifac[i-1]*inv[i]%Mod;
Pow[0]=1; for(LL i=1;i<=N;i++) Pow[i]=Pow[i-1]*2LL%(Mod-1);
return ;
}
inline LL C(LL n,LL m){
if(n==m) return 1; if(!m) return 1;
//printf("ifac[%lld] = %lld   ifac[%lld] = %lld   fac[%lld] = %lld\n",n-m,ifac[n-m],m,ifac[m],n,fac[n]);
return fac[n]*ifac[m]%Mod*ifac[n-m]%Mod;
}
LL ans=0;

int main(){
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);