#include using namespace std; //#include //using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 200003 #define MOD 1000000007 #define INF 1000000000 ll modpow(ll a,ll x){ ll ret=1; a%=MOD; while(x>0){ if(x%2==1){ ret=ret*a%MOD; } a=a*a%MOD; x>>=1; } return ret; } ll modinv(ll x){ return modpow(x,MOD-2); } int main(){ int N; ll K; cin>>N>>K; vector A(N); for(int i=0;i>A[i]; } if(K==0){ ll ans=0; for(int i=0;i com(N+1,0); com[0]=1; for(int i=1;i<=N;i++){ com[i]=com[i-1]; com[i]=com[i]*(K+(ll)i)%MOD; com[i]=com[i]*modinv(i)%MOD; } ll ans=0; for(int i=0;i