#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

#define N 120
#define M 520

const LL mod=1000000007;
LL n,m,ans,a[N],f[N][N][M];

void upd(LL &x,LL y){x=(x+y)%mod;}

int main(){
	scanf("%lld%lld",&n,&m);
	for (LL i=1;i<=n;++i){
		scanf("%lld",a+i);
	}
	sort(a+1,a+n+1,greater<LL>());
	f[1][1][a[1]]=1;
	for (LL i=2;i<=n;++i)
		for (LL j=0;j<=i;++j)
			for (LL k=0;k<=m;++k)
				if (f[i-1][j][k]){
					upd(f[i][j][k],f[i-1][j][k]*(k-(a[i]-1)*j));
					if (k+a[i]<=m) upd(f[i][j+1][k+a[i]],f[i-1][j][k]*(j+1));
					for (LL l=1;l<a[i]&&k+l<=m;++l) upd(f[i][j][k+l],f[i-1][j][k]*2*j);
					if (j>1) for (LL l=0;l<a[i]&&k+l<=m;++l) upd(f[i][j-1][k+l],f[i-1][j][k]*(j-1)*(a[i]-l-1));
				}
	for (LL i=1;i<=n;++i) upd(ans,f[n][i][m]);
	printf("%lld\n",ans);
	
	return 0;
}
			