#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int N = 1E3 + 10;
int n, k, ans;
int dp[N][N], a[N];
long long solve(long long x) {
  int now;
  dp[0][0] = 1;
  now = 0;
  for (int i = 1; i <= n; i++) {
    while (a[i] - x >= a[now + 1]) ++now;
    dp[i][0] = dp[i - 1][0];
    for (int j = 1; j <= k; j++) {
      dp[i][j] = (dp[i - 1][j] + dp[now][j - 1]) % mod;
    }
  }
  return dp[n][k];
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= 100000 / (k - 1); i++) {
    ans = (ans + solve(i)) % mod;
  }
  printf("%d\n", ans);
  return 0;
}
