#include <bits/stdc++.h>
using namespace std;
const int N = 1005, Mx = 1e5 + 10, mod = 998244353;
int n, k, ans, a[N], c[N * N], dp[N][N];
void solve(int x) {
  dp[0][0] = 1;
  for (int i = 1; i < n + 1; i++)
    for (int j = 0; j < k + 1; j++) {
      dp[i][j] = dp[i - 1][j];
      if (j) dp[i][j] = (dp[i][j] + dp[c[max(a[i] - x, 0)]][j - 1]) % mod;
      ;
    }
}
int main() {
  cin >> n >> k;
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &a[i]);
    ;
    a[i]++;
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i < n + 1; i++) c[a[i]] = i;
  for (int i = 1; i < Mx; i++) c[i] = max(c[i], c[i - 1]);
  for (int i = 1; i < Mx / (k - 1) + 1; i++) {
    solve(i);
    ans = (ans + dp[n][k]) % mod;
    ;
  }
  cout << ans;
}
