func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 100010;   int n, d, m, cnta = 0, cntb = 0;   long long a[MAXN], b[MAXN];   inline bool cmp(long long x, long long y) { return x > y; }   int main() {     scanf( %d%d%d , &n, &d, &m);     for (int i = 1; i <= n; i++) {       long long x;       scanf( %lld , &x);       if (x > m)         a[++cnta] = x;       else         b[++cntb] = x;     }     sort(a + 1, a + cnta + 1, cmp);     sort(b + 1, b + cntb + 1, cmp);     for (int i = 1; i <= cnta; i++) a[i] += a[i - 1];     for (int i = 1; i <= cntb; i++) b[i] += b[i - 1];     long long ans = b[cntb];     for (int i = 1; i <= cnta; i++) {       if ((i - 1) * (d + 1) + 1 > n) break;       int ind = min(n - (i - 1) * (d + 1) - 1, cntb);       ans = max(ans, a[i] + b[ind]);     }     printf( %lld n , ans);     return 0;   }   