#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int MOD = 998244353;
const int M = 1005;
int lower[N];
int arr[M];
int dp[M][M], vis[M][M];
int n, k, visid, x;
bool flag;
int solve(int idx, int take) {
  if (take == k) return flag = 1;
  if (idx == n) return 0;
  int &ret = dp[idx][take];
  if (vis[idx][take] == visid) return ret;
  vis[idx][take] = visid;
  ret = solve(idx + 1, take) + solve(lower[arr[idx] + x], take + 1);
  if (ret >= MOD) ret -= MOD;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(lower, -1, sizeof lower);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  for (int i = n - 1; ~i; i--) {
    lower[arr[i]] = i;
  }
  lower[N - 1] = n;
  for (int i = N - 1; ~i; i--) {
    if (~lower[i]) continue;
    lower[i] = lower[i + 1];
  }
  int ans = 0;
  flag = true;
  for (int i = 1; flag; i++) {
    flag = false;
    visid++;
    x = i;
    ans += solve(0, 0);
    if (ans >= MOD) ans -= MOD;
  }
  cout << ans << endl;
  return 0;
}
