#include"iostream" #include"algorithm" #include"cstring" #include"cstdio" #include"set" #include"vector" #include"map" #define MAXN 106 //#define int long long usingnamespace std; typedeflonglong ll; constdouble eps = 1e-7; #define P 1000000007 int n , L; int A[MAXN]; int dp[2][MAXN][1006][4]; intmain(){ cin >> n >> L; if( n == 1 ) returnputs("1") , 0; for( int i = 1 ; i <= n ; ++ i ) scanf("%d",A + i); sort( A + 1 , A + 1 + n ); int cur = 0 , las = 1; dp[0][0][0][0] = 1 , A[0] = A[1]; for( int i = 0 ; i < n ; ++ i ) { cur ^= 1 , las ^= 1; memset( dp[cur] , 0 , sizeof dp[cur] ); for( int j = 0 ; j <= i ; ++ j ) { for( int k = 0 ; k <= L ; ++ k ) { for( int h = 0 ; h < 3 ; ++ h ) { if( !dp[las][j][k][h] ) continue; int w = k + ( A[i + 1] - A[i] ) * ( 2 * j - h ); if( w < 0 || w > L ) continue; int c = dp[las][j][k][h]; ( dp[cur][j + 1][w][h] += 1ll * c * ( j + 1 - h ) % P ) %= P; ( dp[cur][j + 1][w][h + 1] += 1ll * c * ( 2 - h ) % P ) %= P; if( j ) ( dp[cur][j - 1][w][h] += 1ll * c * ( j - 1 ) % P ) %= P; if( j ) ( dp[cur][j][w][h] += 1ll * c * ( 2 * j - h ) % P ) %= P; if( j ) ( dp[cur][j][w][h + 1] += 1ll * c * ( 2 - h ) % P ) %= P; } } } } int res = 0; for( int i = 0 ; i <= L ; ++ i ) ( res += dp[cur][1][i][2] ) %= P; cout << res << endl; }