#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ for(auto it : P) { s << "<" << it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ for(auto it : P) { s << "<" << it.first << "->" << it.second << "> "; } return s << endl; }




template<int MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};

const int MOD = 1000000007;
using mint = Fp<MOD>;

int main() {
    int N, X;
    cin >> N >> X;
    vector<int> L(N);
    for (int i = 0; i < N; ++i) cin >> L[i];
    sort(L.begin(), L.end(), greater<int>());
    
    vector<vector<mint>> dp(N+1, vector<mint>(X+1, mint(0)));
    auto nex = dp;
    dp[0][0] = 1;
    for (int i = 0; i < N; ++i) {
        nex.assign(N+1, vector<mint>(X+1, mint(0)));
        for (int c = 0; c <= N; ++c) {
            for (int x = 0; x <= X; ++x) {
                if (dp[c][x] == 0) continue;
                
                // 増やす
                if (c+1 <= N && x+L[i]+c <= X) nex[c+1][x+L[i]] += dp[c][x] * (c+1);

                // どこかにくっつける
                for (int hami = 1; hami <= L[i]; ++hami) {
                    if (x+hami + c-1  > X) break;
                    nex[c][x+hami] += dp[c][x] * c * 2;
                }

                // どこかに含まれる
                nex[c][x] += dp[c][x] * (x - (L[i]-1)*c);

                // つなぐ
                if (c > 0) {
                    for (int hami = 1; hami <= L[i]; ++hami) {
                        if (x+hami + c-2 > X) break;
                        nex[c-1][x+hami] += dp[c][x] * (c-1) * (L[i]-hami+1);
                    }     
                }
            }
        }
        swap(dp, nex);

        /*
        COUT("-----------");
        COUT(i);
        for (int c = 0; c <= N; ++c) {
            for (int x = 0; x <= X; ++x) {
                cout << c << ", " << x << ": " << dp[c][x] << endl;
            }
        }
        */
    }
    cout << dp[1][X] << endl;
}


Measured memory_bytes: 1024