func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long fuck = 4e17;   long long n, arr[100010];   vector<long long> ans;   bool chk(long long x) {     vector<int> diffs;     for (int i = 0; i + 1 < n; i++) {       long long next = arr[i + 1];       if (arr[i] <= x) next = min(arr[i + 1], x);       long long d = next - arr[i];       if (diffs.size() == 0)         diffs.push_back(d);       else if (diffs[0] != d)         return false;     }     return true;   }   int main() {     scanf( %lld , &n);     for (int i = 0; i < n; i++) scanf( %lld , &arr[i]);     sort(arr, arr + n);     if (n == 1) {       printf( -1 );       return 0;     }     if (n == 2) {       long long d = arr[1] - arr[0];       ans.push_back(arr[0] - d);       ans.push_back(arr[1] + d);       if (!(d & 1)) ans.push_back(arr[1] - d / 2);     } else {       long long prev = arr[1] - arr[0], another = fuck, pos;       for (int i = 2; i < n; i++) {         long long d = arr[i] - arr[i - 1];         if (d != prev && d != another && another != fuck) {           printf( 0 );           return 0;         }         if (d != prev) {           pos = i;           another = arr[i] - arr[i - 1];         }       }       if (another == fuck) {         ans.push_back(arr[0] - prev);         ans.push_back(arr[n - 1] + prev);       } else {         if (prev == 2ll * another)           ans.push_back(arr[1] - another);         else if (another == prev * 2ll)           ans.push_back(arr[pos] - prev);       }     }     set<long long> res;     for (int i = 0; i < ans.size(); i++)       if (chk(ans[i])) res.insert(ans[i]);     printf( %d n , res.size());     for (set<long long>::iterator it = res.begin(); it != res.end(); it++)       printf( %lld  , *it);     return 0;   }   