Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (ll i=0; i<(n); i++) 
using namespace std;
typedef ll = long long;
typedef P = pair<ll int, ll int>;
const ll int INF = 100000000000;
//ll MOD 1000000007;

int main() {
    ll int n, x, y;
    cin >> n >> x >> y;
    x--, y--;
    vector<ll int> ans(n);
    rep(sv, n){
        vector<ll int> dist(n, INF);
        queue<ll int> q;
        auto push = [&](ll int v, ll int d){
            if (dist[v] != INF) return;
            dist[v] = d;
            q.push(v);
        };
        push(sv, 0);
        while (!q.empty()){
            ll int v = q.front(); q.pop();
            ll int d = dist[v];
            if (v-1 >= 0) push(v-1, d+1);
            if (v+1 < n) push(v+1, d+1);
            if (v == x) push(y, d+1);
            if (v == y) push(x, d+1);
        }
        rep(i,n) ans[dist[i]]++;
    }
    for (ll int i=1; i < n; i++){
        cout << ans[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc:4:9: error: 'll' does not name a type
    4 | typedef ll = long long;
      |         ^~
a.cc:5:9: error: 'P' does not name a type
    5 | typedef P = pair<ll int, ll int>;
      |         ^
a.cc:6:7: error: 'll' does not name a type
    6 | const ll int INF = 100000000000;
      |       ^~
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll int n, x, y;
      |     ^~
a.cc:11:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |     cin >> n >> x >> y;
      |            ^
      |            yn
a.cc:11:17: error: 'x' was not declared in this scope
   11 |     cin >> n >> x >> y;
      |                 ^
a.cc:11:22: error: 'y' was not declared in this scope; did you mean 'yn'?
   11 |     cin >> n >> x >> y;
      |                      ^
      |                      yn
a.cc:13:18: error: template argument 2 is invalid
   13 |     vector<ll int> ans(n);
      |                  ^
a.cc:14:9: error: expected ';' before 'sv'
   14 |     rep(sv, n){
      |         ^~
a.cc:2:27: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i=0; i<(n); i++)
      |                           ^
a.cc:14:9: error: 'sv' was not declared in this scope
   14 |     rep(sv, n){
      |         ^~
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i=0; i<(n); i++)
      |                                ^
a.cc:15:22: error: template argument 2 is invalid
   15 |         vector<ll int> dist(n, INF);
      |                      ^
a.cc:15:32: error: 'INF' was not declared in this scope
   15 |         vector<ll int> dist(n, INF);
      |                                ^~~
a.cc:15:35: error: expression list treated as compound expression in initializer [-fpermissive]
   15 |         vector<ll int> dist(n, INF);
      |                                   ^
a.cc:16:21: error: template argument 2 is invalid
   16 |         queue<ll int> q;
      |                     ^
a.cc:17:25: error: 'll' is not a type
   17 |         auto push = [&](ll int v, ll int d){
      |                         ^~
a.cc:17:25: error: two or more data types in declaration of 'v'
a.cc:17:33: error: expected ')' before ',' token
   17 |         auto push = [&](ll int v, ll int d){
      |                        ~        ^
      |                                 )
a.cc: In lambda function:
a.cc:17:33: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:17:38: error: expected initializer before 'int'
   17 |         auto push = [&](ll int v, ll int d){
      |                                      ^~~
a.cc:23:19: error: request for member 'empty' in 'q', which is of non-class type 'int'
   23 |         while (!q.empty()){
      |                   ^~~~~
a.cc:24:15: error: expected ';' before 'int'
   24 |             ll int v = q.front(); q.pop();
      |               ^~~~
      |               ;
a.cc:24:37: error: request for member 'pop' in 'q', which is of non-class type 'int'
   24 |             ll int v = q.front(); q.pop();
      |                                     ^~~
a.cc:25:15: error: expected ';' before 'int'
   25 |             ll int d = dist[v];
      |               ^~~~
      |               ;
a.cc:26:17: error: 'v' was not declared in this scope
   26 |             if (v-1 >= 0) push(v-1, d+1);
      |                 ^
a.cc:26:37: error: 'd' was not declared in this scope
   26 |             if (v-1 >= 0) push(v-1, d+1);
      |                                     ^
a.cc:27:17: error: 'v' was not declared in this scope
   27 |             if (v+1 < n) push(v+1, d+1);
      |                 ^
a.cc:27:36: error: 'd' was not declared in this scope
   27 |             if (v+1 < n) push(v+1, d+1);
      |                                    ^
a.cc:28:17: error: 'v' was not declared in this scope
   28 |             if (v == x) push(y, d+1);
      |                 ^
a.cc:28:33: error: 'd' was not declared in this scope
   28 |             if (v == x) push(y, d+1);
      |                                 ^
a.cc:29:17: error: 'v' was not declared in this scope
   29 |             if (v == y) push(x, d+1);
      |                 ^
a.cc:29:33: error: 'd' was not declared in this scope
   29 |             if (v == y) push(x, d+1);
      |                                 ^
a.cc:31:13: error: expected ';' before 'i'
   31 |         rep(i,n) ans[dist[i]]++;
      |             ^
a.cc:2:27: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i=0; i<(n); i++)
      |                           ^
a.cc:31:13: error: 'i' was not declared in this scope
   31 |         rep(i,n) ans[dist[i]]++;
      |             ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (ll i=0; i<(n); i++)
      |                                ^
a.cc:33:12: error: expected ';' before 'int'
   33 |     for (ll int i=1; i < n; i++){
      |            ^~~~
      |            ;
a.cc:33:22: error: 'i' was not declared in this scope
   33 |     for (ll int i=1; i < n; i++){
      |                      ^