func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[100005];   vector<int> all, empty;   inline int read() {     int x = 0, f = 1;     char ch = getchar();     while (!isdigit(ch)) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (isdigit(ch)) {       (x *= 10) += ch -  0 ;       ch = getchar();     }     return x * f;   }   vector<int> solve(int x) {     if (x > 19) return empty;     bool flag = false;     for (int v : all)       if (v & 1) {         flag = true;         break;       }     if (!flag) {       for (int &v : all) v >>= 1;       return solve(x + 1);     }     vector<int> backup, nega, posi, res;     backup = all;     for (int &v : all) {       if (v & 1)         v = (v + 1) >> 1;       else         v = v >> 1;     }     {       sort(all.begin(), all.end());       all.erase(unique(all.begin(), all.end()), all.end());     };     nega = solve(x + 1);     all = backup;     for (int &v : all) {       if (v & 1)         v = (v - 1) >> 1;       else         v = v >> 1;     }     {       sort(all.begin(), all.end());       all.erase(unique(all.begin(), all.end()), all.end());     };     posi = solve(x + 1);     nega.push_back(-(1 << x)), posi.push_back(1 << x);     return nega.size() < posi.size() ? nega : posi;   }   int main() {     n = read();     for (int i = 1; i <= n; i++) all.push_back(read());     vector<int> res = solve(0);     sort(res.begin(), res.end());     printf( %lld n , res.size());     for (int v : res) printf( %d  , v);     return 0;   }   