func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long N = 1100;   const long long M = 260;   const long long mod = 998244353;   const long long MOD = 998244353;   const long double eps = 0.000000001;   const long long P = 1336;   const long long inf = 1e16;   mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());   long long n, k;   vector<pair<long long, long long> > a;   long long dp[N][N];   long long solve(long long x) {     for (long long j = 0; j < k; j++) {       for (long long i = 0; i < n; i++) {         dp[j][i] = 0;         if (j == 0) dp[j][i] = 1;       }     }     long long ans = 0;     for (long long j = 1; j < k; j++) {       long long uk = 0, s = 0;       for (long long i = 0; i < n; i++) {         while (uk < n && a[uk].first + x <= a[i].first) {           s += dp[j - 1][uk];           s %= mod;           uk++;         }         dp[j][i] = s;         if (j == k - 1) {           ans += dp[j][i];           ans %= mod;         }       }     }     return ans;   }   int32_t main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     srand(time(0));     cin >> n >> k;     a.resize(n);     long long ma = 0;     for (long long i = 0; i < n; i++) {       cin >> a[i].first;       ma = max(ma, a[i].first);       a[i].second = i;     }     sort(a.begin(), a.end());     long long ans = 0, s = 0;     for (long long i = ma / (k - 1); i >= 1; i--) {       long long c = solve(i);       c -= s;       c += mod;       c %= mod;       s += c;       s %= mod;       c *= i;       c %= mod;       ans += c;       ans %= mod;     }     cout << ans;   }   