func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, i, a, b, x, y, o, z, p, q, sum, c;   int main() {     cin >> n;     vector<long long> v;     for (i = 0; i < n; i++) {       cin >> x;       if (x == 0)         o++;       else         v.push_back(x);     }     sort(v.begin(), v.end());     a = 0;     b = v.size() - 1;     sum += o * (o - 1) / 2;     if (v.size() > 1) {       while (a < b) {         if (v[a] > 0 || v[b] < 0)           break;         else {           if (v[a] + v[b] < 0)             a++;           else if (v[a] + v[b] > 0)             b--;           else {             p = 1;             q = 1;             x = v[a];             a++;             y = v[b];             b--;             while (1) {               if (v[a] == x) {                 p++;                 a++;               } else                 break;             }             while (1) {               if (v[b] == y) {                 q++;                 b--;               } else                 break;             }             sum += p * q;           }         }       }     }     cout << sum;   }   