#include <bits/stdc++.h>
using namespace std;
const int N = 100000, mxn = 1010, md = 998244353;
int n, k, a[mxn], pre[mxn], ans, f[mxn][mxn], q[mxn];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), pre[i] = i;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= N / (k - 1); ++i) {
    for (int j = 1; j <= n; ++j)
      for (; pre[j] && a[j] - a[pre[j]] < i; --pre[j])
        ;
    f[0][0] = q[0] = 1;
    for (int j = 1; j <= k; ++j) f[0][j] = q[j] = 0;
    for (int j = 1, cur = 0; j <= n; ++j) {
      for (int l = k; l; --l) f[j][l] = (f[j - 1][l] + f[pre[j]][l - 1]) % md;
      f[j][0] = f[j - 1][0];
    }
    ans = (ans + f[n][k]) % md;
  }
  printf("%d\n", ans);
  return 0;
}
