Language: C++

#include <bits/stdc++.h>

#define reb(i,b,n) for(int i=(int)(b); i<(int)(n); i++)
#define rep(i,n) reb(i,0,n)
#define rreb(i,b,n) for(int i = b-1; i >= n; i--)
#define rrep(i,n) reb(i,n,0)
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define reach(it,v) for(__typeof((v).rbegin()) it=(v).rbegin();it!=(v).rend();it++)
#define vall(x) (x).begin(), (x).end()
#define rvall(x) (x).rbegin(), (x).rend()
#define vsort(v) sort(vall(v))
#define rvsort(v) sort(rvall(v))
#define len(array) (sizeof (array) / sizeof *(array))
#define aall(x) x, x+len(x)
#define asort(x) sort(aall(x))
#define rasort(a, type) sort(aall(a), greater<type>())
#define afill(a, v) fill(aall(a), v)
#define afill2(a, v, type) fill((type *)a, (type *)(a + len(a)), v)
#define sz(x) (int)(x).size()
#define mp(a, b) make_pair(a, b)
#define fi first
#define se second
#define pb push_back
#define _USE_MATH_DEFINES
#define priArr(table, n) rep(i,n){cout<<table[i]<<' ';}cout<<'\n';
#define priAr2(table,W,H) rep(y,H){rep(x,W)cout<<table[y][x]<<' ';cout<<'\n';}
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = ["<<(x)<<"]"<<endl;

using namespace std;
using std::stringstream;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class F, class T> inline void convert(const F &f, T &t){stringstream ss;ss<<f;ss>>t;}
template<class T> inline T sqr(T x) {return x*x;}

typedef long long ll; typedef unsigned long long ull;
typedef pair <int, int> P; typedef pair <int, P> PP;
typedef vector<int> vi;typedef vector<vi> vvi;typedef vector<string> vs;
typedef vector<ll> vl; typedef vector<P > vP; typedef vector<char> vc;
typedef long double ld;

const static int INF = 0x3f3f3f3f;
const static ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const static double EPS = 1e-9;
const static ll MOD = 1000000007LL;

int dx[] = {1,0,-1,0}, dy[] = {0,1,0,-1};
/* -------------------------------------------------------------------------- */
static queue<int> qu /* methods() = push, pop, front, back, size, empty(qu == empty?) */;
static void push(v, d, vi &dist) {
    if (dist[v] != INF) return;
    dist[v] = d;
    qu.pb(v);
}

int main(int argc, char *argv[])
{
    int N, X, Y;
    cin >> N >> X >> Y;
    X--;Y--;

    vi ans(N-1, 0);

    rep(sv, N) {
        vi dist(N, INF);
        qu.push(sv, 0);
        while (!qu.empty()) {
            int v = qu.front(); qu.pop();
            int d = dist[v];
            if (v+1 < N) push(v+1, d+1, &dist);
            if (v == X)  push(Y, d+1, &dist);
        }

        rep(i, N) {
            ans[dist[i]]++;
        }
    }

    rep(i, N-1) { cout << ans[i] << endl; }

    return 0;
}


Compiler output:
a.cc:51:13: error: variable or field 'push' declared void
   51 | static void push(v, d, vi &dist) {
      |             ^~~~
a.cc:51:18: error: 'v' was not declared in this scope; did you mean 'vs'?
   51 | static void push(v, d, vi &dist) {
      |                  ^
      |                  vs
a.cc:51:21: error: 'd' was not declared in this scope; did you mean 'ld'?
   51 | static void push(v, d, vi &dist) {
      |                     ^
      |                     ld
a.cc:51:27: error: expected primary-expression before '&' token
   51 | static void push(v, d, vi &dist) {
      |                           ^
a.cc:51:28: error: 'dist' was not declared in this scope
   51 | static void push(v, d, vi &dist) {
      |                            ^~~~
a.cc: In function 'int main(int, char**)':
a.cc:67:16: error: no matching function for call to 'std::queue<int>::push(int&, int)'
   67 |         qu.push(sv, 0);
      |         ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
  283 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:283:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
  288 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:288:7: note:   candidate expects 1 argument, 2 provided
a.cc:71:26: error: 'push' was not declared in this scope
   71 |             if (v+1 < N) push(v+1, d+1, &dist);
      |                          ^~~~
a.cc:72:26: error: 'push' was not declared in this scope
   72 |             if (v == X)  push(Y, d+1, &dist);
      |                          ^~~~