func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 3e5 + 10;   const int mod = 998244353;   int up(int x, int y) { return x + y >= mod ? x + y - mod : x + y; }   int a[1010], dp[1010][1010], pos[100010], n, k;   int cal(int x) {     for (int i = 0; i <= k; ++i)       for (int j = 0; j <= n; ++j) dp[i][j] = 0;     for (int i = 1; i <= n; ++i) dp[1][i] = 1;     for (int i = 2; i <= k + 1; ++i) {       for (int j = 1; j <= n; ++j)         dp[i - 1][j] = up(dp[i - 1][j - 1], dp[i - 1][j]);       for (int j = 1; j <= n; ++j)         dp[i][j] = dp[i - 1][a[j] >= x ? pos[a[j] - x] : 0];     }     return dp[k][n];   }   int main() {     scanf( %d%d , &n, &k);     for (int i = 1; i <= n; ++i) scanf( %d , &a[i]);     sort(a + 1, a + 1 + n);     for (int i = n; i >= 1; --i)       pos[a[i]] = (a[i] == a[i + 1] ? pos[a[i + 1]] : i);     for (int i = 1; i <= 100000; ++i) pos[i] = max(pos[i], pos[i - 1]);     int ans = 0;     for (int i = 1; i * (k - 1) <= 100000; ++i) ans = up(ans, cal(i));     printf( %d n , ans);     return 0;   }   