Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;

template <class T> using ordered_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_mset;

#define FOR(i,a,b) for(int i = a; i < b; i++)
#define F0R(i,a) for(int i = 0; i < a; i++)
#define F0Rd(i,a) for (int i = a - 1; i >=0 ; i--)
#define FORd(i,a,b) for (int i = b - 1; i >= a; i--)
#define pb push_back
#define all(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define newl '\n'

#define FAST ios::sync_with_stdio(0); cin.tie(0);
#define print(x) cout << x << newl;
#define finish(x) return cout << x << "\n", 0;
#define bug(x) cerr << ">>> " << #x << " = " << x << "\n";
#define _ << " " << 

const int MXN = 2e5 + 5;
//const int MXN = 1e6 + 5;
const ll MOD = 998244353;
const ll INF = 1e9 + 7;

//int N, X, Y, dist[2005][2005], cnt[2020];
int K, N;
ll A[MXN];

int main(){ FAST
	//ifstream cin("/Users/konwoo/input.txt");
	//ofstream cout("/Users/konwoo/output.txt");


    cin >> N >> X >> Y;
    FOR(i,1,N+1){
        FOR(j,i+1,N+1){
            if (i < X && j > Y){
                dist[i][j] = X-i + 1 + j - Y;
            }
            else if (i < X && j <= Y){
                dist[i][j] = min(j-i, X-i+Y-j+1);
            }
            else if (i >= X && j <= Y){
                if (i == X && j == Y){
                    dist[i][j] = 1;
                }
                else if (i == X){
                    dist[i][j] = min(j-i,1+Y-j);
                }
                else if (j == Y){
                    dist[i][j] = min(j-i,1+i-X);
                }
                else{
                    dist[i][j] = min(j-i,1+Y-j+i-X);
                }
            }
            else{
                if (i < Y){
                    dist[i][j] = min(i - X + 1 + j - Y, Y-i + j - Y);
                }
                else{
                    dist[i][j] = j - i;
                }
            }
            cnt[dist[i][j]]++;
        }
    }



    FOR(k,1,N){
        cout << cnt[k] << newl;


    }










	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:17: error: 'X' was not declared in this scope
   46 |     cin >> N >> X >> Y;
      |                 ^
a.cc:46:22: error: 'Y' was not declared in this scope
   46 |     cin >> N >> X >> Y;
      |                      ^
a.cc:50:17: error: 'dist' was not declared in this scope
   50 |                 dist[i][j] = X-i + 1 + j - Y;
      |                 ^~~~
a.cc:53:17: error: 'dist' was not declared in this scope
   53 |                 dist[i][j] = min(j-i, X-i+Y-j+1);
      |                 ^~~~
a.cc:57:21: error: 'dist' was not declared in this scope
   57 |                     dist[i][j] = 1;
      |                     ^~~~
a.cc:60:21: error: 'dist' was not declared in this scope
   60 |                     dist[i][j] = min(j-i,1+Y-j);
      |                     ^~~~
a.cc:63:21: error: 'dist' was not declared in this scope
   63 |                     dist[i][j] = min(j-i,1+i-X);
      |                     ^~~~
a.cc:66:21: error: 'dist' was not declared in this scope
   66 |                     dist[i][j] = min(j-i,1+Y-j+i-X);
      |                     ^~~~
a.cc:71:21: error: 'dist' was not declared in this scope
   71 |                     dist[i][j] = min(i - X + 1 + j - Y, Y-i + j - Y);
      |                     ^~~~
a.cc:74:21: error: 'dist' was not declared in this scope
   74 |                     dist[i][j] = j - i;
      |                     ^~~~
a.cc:77:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   77 |             cnt[dist[i][j]]++;
      |             ^~~
      |             int
a.cc:77:17: error: 'dist' was not declared in this scope
   77 |             cnt[dist[i][j]]++;
      |                 ^~~~
a.cc:84:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   84 |         cout << cnt[k] << newl;
      |                 ^~~
      |                 int