func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, k;   long long sum, s[1000005], ans = -(1LL << 62);   struct el {     long long val;     int poz;     bool operator<(const el &A) const { return val < A.val; }   };   el a[1000005];   int main() {     int i, poz;     cin.sync_with_stdio(0);     cin >> n;     for (i = 1; i <= n; ++i) {       cin >> a[i].val;       a[i].poz = i;     }     cin >> k;     sort(a + 1, a + n + 1);     for (i = 1; i <= n; ++i) s[i] = s[i - 1] + a[i].val;     for (i = 1, sum = 0; i <= k; ++i) sum += a[i].val * (2 * i - 1 - k);     ans = sum;     poz = 1;     for (i = k + 1; i <= n; ++i) {       sum = sum - a[i - k].val * (1 - k) + a[i].val * (k - 1) -             2 * (s[i - 1] - s[i - k]);       if (sum < ans) {         ans = sum;         poz = i - k + 1;       }     }     for (i = poz; i < poz + k; ++i) cout << a[i].poz <<    ;     return 0;   }   