#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int sum(int a, int b) {
  int s = a + b;
  if (s >= mod) s -= mod;
  return s;
}
int sub(int a, int b) {
  int s = a - b;
  if (s < 0) s += mod;
  return s;
}
int mul(int a, int b) { return (1LL * a * b) % mod; }
const int MAX_N = 1005;
const int MAX_A = 100000;
int a[MAX_N];
int n, k;
int dp[MAX_N][MAX_N];
int pref[MAX_N][MAX_N];
int le[MAX_N];
int solve(int x) {
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j <= n; j++) {
      dp[i][j] = 0;
    }
  }
  le[0] = 0;
  for (int i = 1; i <= n; i++) {
    le[i] = le[i - 1];
    while (a[i] - a[le[i] + 1] >= x) le[i]++;
  }
  dp[0][0] = 1;
  for (int i = 0; i < k; i++) {
    pref[i][0] = dp[i][0];
    for (int j = 1; j <= n; j++) {
      pref[i][j] = sum(pref[i][j - 1], dp[i][j]);
    }
    for (int j = 1; j <= n; j++) {
      dp[i + 1][j] = pref[i][le[j]];
    }
  }
  int f = 0;
  for (int i = 1; i <= n; i++) f = sum(f, dp[k][i]);
  return f;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  int ans = 0;
  for (int x = 1; x * (k - 1) <= MAX_A; x++) {
    ans = sum(ans, solve(x));
  }
  cout << ans << endl;
}
