func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cerr.tie(0);     int n, tmp;     vector<pair<int, int> > a;     cin >> n;     for (int i = 0; i < n; i++) cin >> tmp, a.push_back(make_pair(tmp, i + 1));     sort(a.begin(), a.end());     int c1 = 0, c2 = 0, s1 = 0, s2 = 0;     vector<int> t1, t2;     int l = 0, r = n - 1;     while (l <= r) {       if (s1 > s2) {         if (c2 - c1 <= 0) {           c2++;           s2 += a[r].first;           t2.push_back(a[r].second);           r--;         } else {           c1++;           s1 += a[l].first;           t1.push_back(a[l].second);           l++;         }       } else {         if (c2 - c1 <= 0) {           c2++;           s2 += a[l].first;           t2.push_back(a[l].second);           l++;         } else {           c1++;           s1 += a[r].first;           t1.push_back(a[r].second);           r--;         }       }     }     cout << c1 << endl;     for (int i = 0; i < c1; i++) cout << t1[i] <<    ;     cout << endl;     cout << c2 << endl;     for (int i = 0; i < c2; i++) cout << t2[i] <<    ;     return 0;   }   