func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, tmp;   vector<int> nPos;   vector<int> NegPos, ZeroPos;   int minNeg = -1000000001, minNegPos = -1;   int main() {     scanf( %d n , &n);     for (int i = 0; i < n; i++) {       scanf( %d , &tmp);       nPos.push_back(tmp);     }     for (int i = 0; i < n; i++) {       if (nPos[i] == 0) {         ZeroPos.push_back(i);       } else if (nPos[i] < 0) {         if (nPos[i] > minNeg) {           minNeg = nPos[i];           minNegPos = i;         }         NegPos.push_back(i);       }     }     for (int i = 1; i < ZeroPos.size(); i++) {       printf( 1 %d %d n , ZeroPos[i] + 1, ZeroPos[0] + 1);     }     if (NegPos.size() % 2 == 0) {       if ((!ZeroPos.empty()) && ZeroPos.size() < n) {         printf( 2 %d n , ZeroPos[0] + 1);       }       for (int i = 0; i < n; i++) {         if (nPos[i] != 0) {           for (int j = i + 1; j < n; j++) {             if (nPos[j] != 0) {               printf( 1 %d %d n , j + 1, i + 1);             }           }           break;         }       }     } else {       if (!ZeroPos.empty()) {         printf( 1 %d %d n , ZeroPos[0] + 1, minNegPos + 1);       }       if (ZeroPos.size() + 1 < n) {         printf( 2 %d n , minNegPos + 1);       }       for (int i = 0; i < n; i++) {         if (i != minNegPos && nPos[i] != 0) {           for (int j = i + 1; j < n; j++) {             if (j != minNegPos && nPos[j] != 0) {               printf( 1 %d %d n , j + 1, i + 1);             }           }           break;         }       }     }   }   