func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 300500;   struct node {     long long x;     int id;     node() {}     bool operator<(const node ot) const {       if (x != ot.x) return x < ot.x;       return id < ot.id;     }   } a[maxn];   long long x[maxn];   long long su[maxn];   int main() {     int n;     scanf( %d , &n);     for (int i = 0; i < (int)(n); ++i) {       scanf( %lld , &x[i]);       a[i].x = x[i] + 1e9;       a[i].id = i + 1;     }     int k;     scanf( %d , &k);     sort(a, a + n);     long long dif = 1e18, ans = 0;     long long cur = 0;     for (int i = 0; i < (int)(n); ++i) su[i + 1] = su[i] + a[i].x;     for (int i = 0; i < (int)(k); ++i) cur += a[i].x * i - (su[i]);     dif = cur;     for (int i = k; i < n; i++) {       int j = i - k;       cur -= (su[i] - su[j + 1]) - a[j].x * (k - 1);       cur += a[i].x * (k - 1) - (su[i] - su[j + 1]);       if (cur < dif) {         ans = i - k + 1;         dif = cur;       }     }     for (int i = 0; i < (int)(k); ++i) printf( %d  , a[ans + i].id);   }   