func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int t = 1;     while (t--) {       int n;       cin >> n;       long long int a[n + 1];       int o = 0, idx, z = 0;       long long int maxo = -1000000007;       vector<int> v, v0;       for (long long int i = 1; i < n + 1; i++) {         cin >> a[i];         if (a[i] < 0) {           o++;           if (maxo < a[i]) {             maxo = a[i];             idx = i;           }         }         if (a[i] != 0)           v.push_back(i);         else           v0.push_back(i);       }       if (o % 2 == 1) {         v.erase(find(v.begin(), v.end(), idx));         v0.push_back(idx);         sort(v0.begin(), v0.end());       }       bool ch = 0;       if (v.size() > 0) {         for (long long int i = 0; i < v.size() - 1; i++) {           ch = 1;           cout <<  1   << v[i] <<     << v[i + 1] <<   n ;         }         if (v0.size() > 0) {           for (long long int i = 0; i < v0.size() - 1; i++) {             cout <<  1   << v0[i] <<     << v0[i + 1] <<   n ;           }           cout <<  2   << v0[v0.size() - 1] <<   n ;         }       } else {         if (idx == n) {           cout <<  2   << idx <<   n ;           for (long long int i = 1; i < v0.size() - 1; i++)             cout <<  1   << v0[i] <<     << v0[i + 1] <<   n ;         } else {           for (long long int i = 0; i < v0.size() - 1; i++)             cout <<  1   << v0[i] <<     << v0[i + 1] <<   n ;         }       }     }   }   