func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   long long sum;   struct myS {     int index;     long long v;     myS(){};     myS(int index, long long v) : index(index), v(v){};     bool operator<(const myS& right) const { return v < right.v; }   } a[200001];   bool dd[1000001];   vector<int> res;   int main() {     cin.tie(0);     ios::sync_with_stdio(0);     cout.tie(0);     ;     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> a[i].v;       sum += a[i].v;       a[i].index = i;     }     sort(a + 1, a + n + 1);     for (int i = 1; i <= n; i++) {       long long le = sum - a[i].v;       if (le % 2 == 1) continue;       long long need = (le >> 1);       auto it = lower_bound(a + 1, a + n + 1, myS(0, need));       if ((*it).v == need && (*it).index != a[i].index)         res.push_back(a[i].index);       else if ((*it).v == need && (*it).index == a[i].index) {         auto it2 = upper_bound(a + 1, a + n + 1, myS(0, need));         while (it != it2) {           if ((*it).index != a[i].index) {             res.push_back(a[i].index);             break;           } else             it++;         }       }     }     cout << res.size() << endl;     for (auto i : res) cout << i <<    ;   }   