#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int maxn = 1005;
long long dp[maxn][maxn], dqs[maxn][maxn];
long long co[maxn];
int main() {
  long long n, k, pos, ans = 0;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> co[i];
  int M = 100001 / (k - 1);
  sort(co + 1, co + 1 + n);
  for (int d = 1; d <= M; d++) {
    for (int i = 0; i < n + 1; i++)
      for (int j = 0; j < k + 1; j++) dp[i][j] = 0, dqs[i][j] = 0;
    pos = 0;
    dp[0][0] = dqs[0][0] = 1;
    for (int i = 1; i <= n; i++) {
      while (pos < i && co[i] - co[pos] >= d) pos++;
      if (pos > 0) pos--;
      for (int j = 1; j <= k; j++) dp[i][j] = dqs[pos][j - 1];
      for (int j = 0; j <= k; j++) dqs[i][j] = (dqs[i - 1][j] + dp[i][j]) % mod;
    }
    ans = (ans + dqs[n][k]) % mod;
  }
  cout << ans;
}
