#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long f = 1, ans = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + c - '0';
    c = getchar();
  }
  return f * ans;
}
const long long N = 501;
const long long K = 1001;
long long f[2][N][K], n, k, A[N], cur;
signed main() {
  n = read(), k = read();
  for (long long i = 1; i <= n; i++) A[i] = read();
  sort(A + 1, A + n + 1);
  f[0][0][0] = 1;
  for (long long i = 1; i <= n; i++) {
    cur ^= 1;
    for (long long j = 0; j <= i; j++) {
      for (long long p = 0; p <= k; p++) {
        long long d = A[i] - A[i - 1];
        f[cur][j][p] = 0;
        if (j && (p - (j - 1) * d) >= 0)
          f[cur][j][p] += f[cur ^ 1][j - 1][p - (j - 1) * d],
              f[cur][j][p] %= 1000000007;
        if ((p - (j + 1) * d) >= 0 && j + 1 <= n)
          f[cur][j][p] += f[cur ^ 1][j + 1][p - (j + 1) * d] * (j + 1),
              f[cur][j][p] %= 1000000007;
        if ((p - j * d) >= 0)
          f[cur][j][p] += f[cur ^ 1][j][p - j * d] * (j + 1),
              f[cur][j][p] %= 1000000007;
      }
    }
  }
  long long res = 0;
  for (long long i = 0; i <= k; i++) res += f[cur][0][i], res %= 1000000007;
  printf("%lld\n", res);
  return 0;
}
