#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1010;
const long long mod = 998244353;
inline long long sum(long long a, long long b) { return (a + b) % mod; }
long long n, k;
long long a[maxn];
long long dp[maxn][maxn], pref[maxn][maxn];
long long le[maxn];
long long solve(long long val) {
  for (long long i = 0; i <= k; i++)
    for (long long j = 0; j <= n; j++) dp[i][j] = 0, pref[i][j] = 0;
  le[0] = 0;
  for (long long i = 1; i <= n; i++) {
    le[i] = le[i - 1];
    while (a[i] - a[le[i] + 1] >= val) le[i]++;
  }
  dp[0][0] = 1;
  for (long long i = 0; i + 1 <= k; i++) {
    pref[i][0] = dp[i][0];
    for (long long j = 1; j <= n; j++) {
      pref[i][j] = sum(pref[i][j - 1], dp[i][j]);
    }
    for (long long j = 1; j <= n; j++) {
      dp[i + 1][j] = pref[i][le[j]];
    }
  }
  long long ans = 0;
  for (long long i = 1; i <= n; i++) ans = sum(ans, dp[k][i]);
  return ans;
}
signed main() {
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  long long ans = 0;
  for (long long i = 1; i * (k - 1) <= 100000 + 10; i++)
    ans = sum(ans, solve(i));
  cout << ans;
}
