func_code_string: #include <bits/stdc++.h>   using namespace std;   int solve(vector<int> &v, int pow) {     if (pow == 20) {       for (int j : v) {         if (j) return 40;       }       return 0;     }     bool fnd = false;     for (int i = 0; i < v.size(); i++) {       if (v[i] % (1 << (pow + 1))) {         fnd = true;       }     }     if (!fnd)       return solve(v, pow + 1);     else {       vector<int> v2(v);       for (int i = 0; i < v.size(); i++) {         if (v[i] % (1 << (pow + 1))) {           v2[i] += (1 << pow);         }       }       sort(v2.begin(), v2.end());       v2.erase(unique(v2.begin(), v2.end()), v2.end());       int tmp = 1 + solve(v2, pow + 1);       v2.clear();       for (int i = 0; i < v.size(); i++) {         v2.push_back(v[i]);       }       for (int i = 0; i < v.size(); i++) {         if (v[i] % (1 << (pow + 1))) {           v2[i] -= (1 << pow);         }       }       sort(v2.begin(), v2.end());       v2.erase(unique(v2.begin(), v2.end()), v2.end());       return min(tmp, 1 + solve(v2, pow + 1));     }   }   int main() {     int N;     cin >> N;     vector<int> v(N);     for (int i = 0; i < N; i++) {       cin >> v[i];     }     int ans = solve(v, 0);     cout << ans << endl;     vector<int> lvl(v);     int rank = 0;     while (rank != 20) {       bool fnd = false;       for (int i = 0; i < v.size(); i++) {         if (v[i] % (1 << (rank + 1))) {           fnd = true;         }       }       if (!fnd) {         rank++;       } else {         vector<int> v2(v);         vector<int> v3(v);         for (int i = 0; i < v.size(); i++) {           if (v[i] % (1 << (rank + 1))) {             v2[i] += (1 << rank);           }         }         sort(v2.begin(), v2.end());         v2.erase(unique(v2.begin(), v2.end()), v2.end());         int tmp = 1 + solve(v2, rank + 1);         for (int i = 0; i < v.size(); i++) {           if (v[i] % (1 << (rank + 1))) {             v3[i] -= (1 << rank);           }         }         sort(v3.begin(), v3.end());         v3.erase(unique(v3.begin(), v3.end()), v3.end());         int tmp2 = 1 + solve(v3, rank + 1);         if (tmp < tmp2) {           cout << -(1 << rank) <<    ;           v = v2;         } else {           cout << (1 << rank) <<    ;           v = v3;         }         rank++;       }     }     cout << endl;   }   