Language: C++

ll N, X;
vector<ll> x;
vector<ll> table;
vector<ll> diff;

ll makegcd(ll a, ll b) {
    ll large = (a > b) ? a : b;
    ll small = (a > b) ? b : a;
    if (!(large % small)) return small;
    else {
        int nextsmall = large % small;
        return makegcd(small, nextsmall); 
    }
}

int main() {
    cin >> N >> X;
    for (int i = 0; i < N; i++) {
        ll temp; scanf("%Ld", & temp);
        x.push_back(temp);
    }
    sort(x.begin(), x.end());
    int flag = 1;
    for (int i = 0; i < N+1; i++) {
        if (flag && x[i] > X) {
            table.push_back(X);
            flag = 0;
        }
        table.push_back(x[i]);
    }

    for (int i = 0; i < N; i++) diff.push_back(table[i+1] - table[i]);

    ll tempgcd = diff[0];
    for (int i = 1; i < N; i++) tempgcd = makegcd(tempgcd, diff[i]);

    cout << tempgcd << endl;
    return 0;
}


Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll N, X;
      | ^~
a.cc:2:1: error: 'vector' does not name a type
    2 | vector<ll> x;
      | ^~~~~~
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<ll> table;
      | ^~~~~~
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<ll> diff;
      | ^~~~~~
a.cc:6:1: error: 'll' does not name a type
    6 | ll makegcd(ll a, ll b) {
      | ^~
a.cc: In function 'int main()':
a.cc:17:5: error: 'cin' was not declared in this scope
   17 |     cin >> N >> X;
      |     ^~~
a.cc:17:12: error: 'N' was not declared in this scope
   17 |     cin >> N >> X;
      |            ^
a.cc:17:17: error: 'X' was not declared in this scope
   17 |     cin >> N >> X;
      |                 ^
a.cc:19:9: error: 'll' was not declared in this scope
   19 |         ll temp; scanf("%Ld", & temp);
      |         ^~
a.cc:19:33: error: 'temp' was not declared in this scope
   19 |         ll temp; scanf("%Ld", & temp);
      |                                 ^~~~
a.cc:19:18: error: 'scanf' was not declared in this scope
   19 |         ll temp; scanf("%Ld", & temp);
      |                  ^~~~~
a.cc:20:9: error: 'x' was not declared in this scope
   20 |         x.push_back(temp);
      |         ^
a.cc:22:10: error: 'x' was not declared in this scope
   22 |     sort(x.begin(), x.end());
      |          ^
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(x.begin(), x.end());
      |     ^~~~
      |     short
a.cc:26:13: error: 'table' was not declared in this scope; did you mean 'mutable'?
   26 |             table.push_back(X);
      |             ^~~~~
      |             mutable
a.cc:29:9: error: 'table' was not declared in this scope; did you mean 'mutable'?
   29 |         table.push_back(x[i]);
      |         ^~~~~
      |         mutable
a.cc:32:33: error: 'diff' was not declared in this scope
   32 |     for (int i = 0; i < N; i++) diff.push_back(table[i+1] - table[i]);
      |                                 ^~~~
a.cc:32:48: error: 'table' was not declared in this scope; did you mean 'mutable'?
   32 |     for (int i = 0; i < N; i++) diff.push_back(table[i+1] - table[i]);
      |                                                ^~~~~
      |                                                mutable
a.cc:34:5: error: 'll' was not declared in this scope
   34 |     ll tempgcd = diff[0];
      |     ^~
a.cc:35:33: error: 'tempgcd' was not declared in this scope
   35 |     for (int i = 1; i < N; i++) tempgcd = makegcd(tempgcd, diff[i]);
      |                                 ^~~~~~~
a.cc:35:60: error: 'diff' was not declared in this scope
   35 |     for (int i = 1; i < N; i++) tempgcd = makegcd(tempgcd, diff[i]);
      |                                                            ^~~~
a.cc:35:43: error: 'makegcd' was not declared in this scope
   35 |     for (int i = 1; i < N; i++) tempgcd = makegcd(tempgcd, diff[i]);
      |                                           ^~~~~~~
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << tempgcd << endl;
      |     ^~~~
a.cc:37:13: error: 'tempgcd' was not declared in this scope
   37 |     cout << tempgcd << endl;
      |             ^~~~~~~
a.cc:37:24: error: 'endl' was not declared in this scope
   37 |     cout << tempgcd << endl;
      |                        ^~~~