Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

#define ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n - 1; i >= 0; i--)
#define for(i, m, n) for(int i = m; i <= n; i++)
#define forr(i, m, n) for(int i = m; i >= n; i--)
#define sor(v, n) sort(v, v+n);


using vll = vector<ll>;
int main(){

    ios_base::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);

    ll k, n;
    cin >> k >> n;
    vll a(n + 1);
    ll s = 0;
    REP(i, n) {
        cin >> a[i];
    }
    a[n] = a[0] + k;
    ll res = 1e10, d;
    REP(i, n) {
        d = a[i + 1] - a[i];
        res = min(res, k - d);
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc:6:19: error: template argument 1 is invalid
    6 | #define ll = long long;
      |                   ^~~~
a.cc:14:20: note: in expansion of macro 'll'
   14 | using vll = vector<ll>;
      |                    ^~
a.cc:6:19: error: template argument 2 is invalid
    6 | #define ll = long long;
      |                   ^~~~
a.cc:14:20: note: in expansion of macro 'll'
   14 | using vll = vector<ll>;
      |                    ^~
a.cc:14:22: error: expected unqualified-id before '>' token
   14 | using vll = vector<ll>;
      |                      ^
a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before '=' token
    6 | #define ll = long long;
      |            ^
a.cc:21:5: note: in expansion of macro 'll'
   21 |     ll k, n;
      |     ^~
a.cc:6:14: error: expected primary-expression before 'long'
    6 | #define ll = long long;
      |              ^~~~
a.cc:21:5: note: in expansion of macro 'll'
   21 |     ll k, n;
      |     ^~
a.cc:21:8: error: 'k' was not declared in this scope
   21 |     ll k, n;
      |        ^
a.cc:21:11: error: 'n' was not declared in this scope; did you mean 'yn'?
   21 |     ll k, n;
      |           ^
      |           yn
a.cc:23:5: error: 'vll' was not declared in this scope; did you mean 'll'?
   23 |     vll a(n + 1);
      |     ^~~
      |     ll
a.cc:6:12: error: expected primary-expression before '=' token
    6 | #define ll = long long;
      |            ^
a.cc:24:5: note: in expansion of macro 'll'
   24 |     ll s = 0;
      |     ^~
a.cc:6:14: error: expected primary-expression before 'long'
    6 | #define ll = long long;
      |              ^~~~
a.cc:24:5: note: in expansion of macro 'll'
   24 |     ll s = 0;
      |     ^~
a.cc:24:8: error: 's' was not declared in this scope
   24 |     ll s = 0;
      |        ^
a.cc:25:9: error: 'i' was not declared in this scope
   25 |     REP(i, n) {
      |         ^
a.cc:25:5: error: 'REP' was not declared in this scope
   25 |     REP(i, n) {
      |     ^~~
a.cc:28:5: error: 'a' was not declared in this scope
   28 |     a[n] = a[0] + k;
      |     ^
a.cc:6:12: error: expected primary-expression before '=' token
    6 | #define ll = long long;
      |            ^
a.cc:29:5: note: in expansion of macro 'll'
   29 |     ll res = 1e10, d;
      |     ^~
a.cc:6:14: error: expected primary-expression before 'long'
    6 | #define ll = long long;
      |              ^~~~
a.cc:29:5: note: in expansion of macro 'll'
   29 |     ll res = 1e10, d;
      |     ^~
a.cc:29:8: error: 'res' was not declared in this scope; did you mean 'rep'?
   29 |     ll res = 1e10, d;
      |        ^~~
      |        rep
a.cc:29:20: error: 'd' was not declared in this scope
   29 |     ll res = 1e10, d;
      |                    ^