Language: C++

#include <iostream>
#include<bits/stdc++.h>
#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 namespace std;

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