#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) {
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= k; j++) dp[i][j] = 0;
  dp[0][0] = 1;
  int ans = 0, now = 0;
  for (int i = 1; i <= n; i++) {
    while (now + 1 <= i && a[i] - a[now + 1] >= x) ++now;
    for (int j = 0; j <= k; j++) dp[i][j] = dp[i - 1][j];
    for (int j = 1; j <= k; j++) dp[i][j] = (dp[i][j] + dp[now][j - 1]) % P;
  }
  return dp[n][k];
}
int main() {
  scanf("%d%d", &n, &k);
  int z = 0;
  for (int i = 1; i <= n; i++) scanf("%d", a + i), z = max(z, a[i]);
  sort(a + 1, a + 1 + n);
  int ans = 0;
  for (int i = 1; i <= z / (k - 1); i++) ans = (ans + solve(i)) % P;
  printf("%d\n", ans);
}
