#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10, P = 998244353;
int n, k, a[N];
int dp[N][N];
int solve(int x) {
  dp[0][0] = 1;
  int ans = 0, now = 0;
  for (int i = 1; i <= n; ++i) {
    while (a[i] - a[now + 1] >= x) ++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]) % P;
  }
  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 + 1 + n);
  int ans = 0;
  for (int i = 1; i <= 1e5 / (k - 1); ++i) ans = (ans + solve(i)) % P;
  printf("%d\n", ans);
}
