Problem:
 Score : 400 points    Problem Statement  We have an undirected graph G with N vertices numbered 1 to N and N edges as follows:   For each i=1,2,...,N-1 , there is an edge between Vertex i and Vertex i+1 .  There is an edge between Vertex X and Vertex Y .   For each k=1,2,...,N-1 , solve the problem below:   Find the number of pairs of integers (i,j) (1 \leq i < j \leq N) such that the shortest distance between Vertex i and Vertex j in G is k .       Constraints   3 \leq N \leq 2 \times 10^3  1 \leq X,Y \leq N  X+1 < Y  All values in input are integers.         Input  Input is given from Standard Input in the following format:  N  X  Y       Output  For each k=1, 2, ..., N-1 in this order, print a line containing the answer to the problem.        Sample Input 1 5 2 4      Sample Output 1 5
4
1
0  The graph in this input is as follows:     There are five pairs (i,j) (1 \leq i < j \leq N) such that the shortest distance between Vertex i and Vertex j is 1 : (1,2)\,,(2,3)\,,(2,4)\,,(3,4)\,,(4,5) . There are four pairs (i,j) (1 \leq i < j \leq N) such that the shortest distance between Vertex i and Vertex j is 2 : (1,3)\,,(1,4)\,,(2,5)\,,(3,5) . There is one pair (i,j) (1 \leq i < j \leq N) such that the shortest distance between Vertex i and Vertex j is 3 : (1,5) . There are no pairs (i,j) (1 \leq i < j \leq N) such that the shortest distance between Vertex i and Vertex j is 4 .       Sample Input 2 3 1 3      Sample Output 2 3
0  The graph in this input is as follows:           Sample Input 3 7 3 7      Sample Output 3 7
8
4
2
0
0       Sample Input 4 10 4 8      Sample Output 4 10
12
10
8
4
1
0
0
0

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N, X, Y = map(int, input().split())
    cnt = [0 for _ in range(N)]
    for i in range(1, N):
        for j in range(i + 1, N + 1):
            dis_ij = min(j - i, abs(X - i) + abs(Y - j) + 1)
            cnt[dis_ij] += 1
    for i in range(1, N):
        print(cnt[i])


if __name__ == "__main__":
    main()

Solution (Python):
from collections import deque
n,x,y=map(int,input().split())

L=[[1]]
for i in range(1,n-1):
	L.append([i-1,i+1])
L.append([n-2])
L[x-1].append(y-1)
L[y-1].append(x-1)

R=[0]*n

def bfs(j):
	V=[-1]*n
	que=deque([])
	que.append(j)
	V[j]=0
	while que:
		p=que.popleft()
		for np in L[p]:
			if V[np]==-1:
				que.append(np)
				V[np]=V[p]+1
	for i in range(n):
		R[V[i]]+=1
	
for j in range(n):
	bfs(j)
for i in range(1,n):
	print(R[i]//2)

Solution (Python):
from collections import deque
n,x,y=map(int,input().split())

L=[[1]]
for i in range(1,n-1):
	L.append([i-1,i+1])
L.append([n-2])
L[x-1].append(y-1)
L[y-1].append(x-1)

R=[0]*n

def bfs(j):
	V=[-1]*n
	que=deque([])
	que.append(j)
	V[j]=0
	while que:
		p=que.popleft()
		for np in L[p]:
			if V[np]==-1:
				que.append(np)
				V[np]=V[p]+1
	for i in range(n):
		R[V[i]]+=1
	
for j in range(n):
	bfs(j)
for i in range(1,n):
	print(R[i]//2)

Solution (Python):
n, x, y = map(int, input().split())

COUNT = [0] * n
for i in range(1, n):
    for j in range(i + 1, n + 1):
        a = j - i; b = abs(x - i) + 1 + abs(y - j)
        d = min(a, b)
        COUNT[d] += 1

for k in range(1, n):
    print(COUNT[k])

Solution (Python):
N, X, Y = map(int, input().split())
a = [0]*N
for i in range(1,N+1):
    for j in range(i+1,N+1):
        a[min(j-i, abs(i-X)+1+abs(j-Y))-1]+= 1
for i in range(N-1):
    print(a[i])

Solution (Python):
N, X, Y = map(int, input().split())

ans = [0] * (N + 1)

for i in range(1, N+1):
    for j in range(i+1, N+1):
        
        tmp = abs(i-X) + abs(j - Y) + 1
        minV = min( abs(i-j) ,tmp)
        ans[minV] += 1

for i in range(1, N):
    print(ans[i])

Solution (Python):

n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = [0]*n
for i in range(n):
    for j in range(i + 1, n):
        dist1 = j - i
        dist2 = abs(x - i) + abs(y - j) + 1
        ans[min(dist1, dist2)] += 1
print(*ans[1:], sep='\n')

Solution (Python):
n,x,y=map(int,input().split())
ans=[0]*(n)
for i in range(1,n+1):
  for j in range(i+1,n+1):
    dist1=j-i
    dist2=abs(x-i)+abs(y-j)+1
    ans[min(dist1,dist2)]+=1
for val in ans[1:]:
  print(val)

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N, X, Y = map(int, input().split())
    ans = [0] * N
    for i in range(1, N + 1):
        for j in range(i + 1, N + 1):
            if i <= X and j <= X:
                dist = j - i
            elif i <= X and j <= Y:
                dist = min(j - i, X - i + 1 + Y - j)
            elif i <= X and Y <= j:
                dist = X - i + j - Y + 1
            elif X <= i <= Y and j <= Y:
                dist = min(j - i, i - X + 1 + Y - j)
            elif X <= i <= Y and Y <= j:
                dist = min(j - i, i - X + 1 + j - Y)
            else:
                dist = j - i
            ans[dist] += 1

    for i in range(1, N):
        print(ans[i])


main()

Solution (Python):
from collections import deque


def dijkstra(start: int, edges: list):
    """print the shortet path  O(|E|log|V|)
    maybe verified
    """
    dist = [float('inf') for _ in range(N)]  
    dist[start] = 0
    prev_v = [-1]*(len(dist))  
    q = deque([(0, start)])  
    while q:
        d_cur, cur = q.pop()
        if dist[cur] < d_cur:  
            continue
        for nex, cost in edges[cur]:
            if dist[nex] > dist[cur]+cost:
                dist[nex] = dist[cur]+cost
                q.append((dist[nex], nex))
                prev_v[nex] = cur
    return dist

    
    
    
    
    
    
    
    


if __name__ == "__main__":
    N, X, Y = map(int, input().split())
    X, Y = X-1, Y-1
    edges = [[] for _ in range(N)]
    for i in range(1, N):
        edges[i].append((i-1, 1))
    for i in range(N-1):
        edges[i].append((i+1, 1))
    edges[X].append((Y, 1))
    edges[Y].append((X, 1))
    

    cnt = [0]*N
    for i in range(N):
        d = dijkstra(i, edges)
        for di in d:
            cnt[di] += 1
    cnt = [ci//2 for ci in cnt]
    print(*cnt[1:], sep="\n")

Solution (Python):
n,x,y = list(map(int, input().split()))

ans = [0]*(n)
for i in range(n-1):
    for j in range(i+1, n):
        
        r1 = min(j - i, (abs(x - i - 1) + 1 + abs(y - j - 1)))
        ans[r1] += 1

for i in ans[1:]:
    print(i)

Solution (Python):
import heapq


def dijkstra(start: int, edges: list):
    """print the shortet path  O(|E|log|V|)
    maybe verified
    """
    dist = [float('inf') for _ in range(N)]  
    dist[start] = 0
    prev_v = [-1]*(len(dist))  
    q = [(0, start)]  
    while q:
        d_cur, cur = heapq.heappop(q)
        if dist[cur] < d_cur:  
            continue
        for nex, cost in edges[cur]:
            if dist[nex] > dist[cur]+cost:
                dist[nex] = dist[cur]+cost
                heapq.heappush(q, (dist[nex], nex))
                prev_v[nex] = cur
    return dist

    
    
    
    
    
    
    
    


if __name__ == "__main__":
    N, X, Y = map(int, input().split())
    X, Y = X-1, Y-1
    edges = [[] for _ in range(N)]
    for i in range(1, N):
        edges[i].append((i-1, 1))
    for i in range(N-1):
        edges[i].append((i+1, 1))
    edges[X].append((Y, 1))
    edges[Y].append((X, 1))
    

    cnt = [0]*N
    for i in range(N):
        d = dijkstra(i, edges)
        for di in d:
            cnt[di] += 1
    cnt = [ci//2 for ci in cnt]
    print(*cnt[1:], sep="\n")

Solution (Python):
n,x,y = list(map(int, input().split()))

ans = [0]*(n)
for i in range(n-1):
    for j in range(i+1, n):
        r1 = min(j-i, (abs(x-i-1) + 1 +  abs(y-j-1) ), (abs(y-i-1) + 1 +  abs(x-j-1) ) )
        ans[r1] += 1

for i in ans[1:]:
    print(i)

Solution (Python):
N, X, Y = map(int, input().split())
X = X-1
Y = Y-1

cnt = [0]*N
for i in range(N):
    for j in range(i+1, N):
        dist = min(abs(i-j),
                   abs(X-i) + abs(Y-j) + 1,
                   abs(X-j) + abs(Y-i) + 1)
        cnt[dist] += 1

print(*cnt[1:], sep='\n')

Solution (Python):
N, X, Y = map(int, input().split())
X = X-1
Y = Y-1

cnt = [0]*N
for i in range(N):
    for j in range(i+1, N):
        dist = min(abs(i-j),
                   abs(X-i) + abs(Y-j) + 1,
                   abs(X-j) + abs(Y-i) + 1)
        cnt[dist] += 1

print(*cnt[1:], sep='\n')

Solution (Python):
n,x,y=map(int,input().split())
res=[0]*n
for i in range(1,n):
  for j in range(i+1,n+1):
    s=(min(j-i,abs(x-j)+1+abs(y-i),abs(x-i)+1+abs(y-j)))
    res[s]+=1
for k in range(1,n):
  print(res[k])

Solution (Python):
import collections
N,X,Y = list(map(int,input().split()))
A = []
for i in range(1,N+1):
    for j in range(i+1,N+1):
        A.append(min(j-i,abs(X-i)+abs(Y-j)+1,abs(X-j)+abs(Y-i)+1))
c = collections.Counter(A)
for k in range(1,N):
    print(c[k])

Solution (Python):
n, x, y = map(int, input().split())
result = [0]*n
for i in range(1, n):
    for j in range(i+1, n+1):
        a = j - i
        b = abs(i-x) + abs(j-y) + 1
        c = abs(i-y) + abs(j-x) + 1
        result[min(a,b,c)] += 1
for r in result[1:]:
    print(r)

Solution (Python):
n, x, y = list(map(int, input().split()))

l = [0] * n

for i in range(1, n):
  for j in range(i+1, n+1):
    c = min(j-i, abs(x-i)+1+abs(y-j))
    l[c] += 1
for k in l[1:]:
  print(k)

Solution (Python):

n,x,y=map(int,raw_input().split())
d=[0]*(n-1)
for i in range(n):
 for j in range(i+1,n):
  d[min(j-i-1,abs(x-1-i)+abs(y-1-j))]+=1
for res in d:
 print res

Solution (Python):
n, x, y = map(int, input().split())

edges = [[] for _ in range(n)]
for i in range(n-1):
    edges[i].append((i+1, 1))
    edges[i+1].append((i, 1))
edges[x-1].append((y-1, 1))
edges[y-1].append((x-1, 1))

import heapq

def dijkstra(start, edge, n):

    dist = [float('inf')] * n
    dist[start] = 0

    pq = [(dist[start], start)]

    while len(pq):
        d, frm = heapq.heappop(pq)
        if dist[frm] < d:
            continue
        for to, cost in edge[frm]:
            if dist[frm] + cost < dist[to]:
                dist[to] = dist[frm] + cost
                heapq.heappush(pq, (dist[to], to))

    return dist

cnt = [0] * n

for i in range(n):
    dist = dijkstra(i, edges, n)
    for d in dist:
        cnt[d] += 1

ans = []
for c in cnt:
    c //= 2
    ans.append(c)

for i in range(1, n):
    print(ans[i])

Solution (Python):
from collections import deque

N,X,Y = map(int,input().split())
X -= 1
Y -= 1

num = [0]*(N-1)

G = [set() for x in range(N)]
for i in range(N-1):
    G[i].add(i+1)
    G[i+1].add(i)

G[X].add(Y)
G[Y].add(X)

def bfs(x):
    search = [0]*N
    nu = 1
    q = deque()
    q.append((x,-1))
    search[x] = 1
    while nu != 0:
        xx,d = q.pop()
        nu -= 1
        if x < xx:
            num[d] += 1
        for g in G[xx]:
            if search[g]:
                continue
            q.appendleft((g,d+1))
            search[g] = 1
            nu += 1

for i in range(N-1):
    bfs(i)

print(*num,sep="\n")

Solution (Python):
n, x, y = [int(i) for i in input().split()]

ans = [0] * (n)
for i in range(n-1):
  for j in range(i+1, n):
    ans[min(abs(j-i), abs((x-1)-i)+1+abs(j-(y-1)))] += 1
   
  
ans = ans[1:]
[print(ans[i]) for i in range(len(ans))]

Solution (Python):
import sys

input = sys.stdin.readline
n, x, y = map(int, input().split())
ans = [0] * (n-1)
for i in range(1, n+1):
    for j in range(1, n+1):
        if i < j:
            
            d = min(j-i, abs(x-i)+abs(j-y)+1)
            
            ans[d-1] += 1
print(*ans, sep="\n")

Solution (Python):
N, X, Y = map(int, input().split())
scores = [0] * N

for i in range(1, N):
    for j in range(i+1, N+1):
        if (i <= X and j <= X) or (i >= Y and j >= Y):
            d = j - i
        elif X < i < Y and X < j < Y:
            d = min([j - i, i - X + Y - j + 1])
        elif i <= X and X < j < Y:
            d = X - i + min([j - X, Y - j + 1])
        elif X < i < Y and  Y <= j:
            d = min([i - X + 1, Y - i]) + j - Y
        elif i <= X and Y <= j:
            d = X - i + j - Y + 1
        else:
            print("undefined pattern {}, {}".format(X, Y))

        scores[d] += 1
for score in scores[1:]:
    print(score)

Solution (Python):
import sys

input = sys.stdin.readline
n, x, y = map(int, input().split())
ans = [0] * (n-1)
for i in range(1, n+1):
    for j in range(1, n+1):
        if i < j:
            
            d = min(j-i, abs(x-i)+abs(j-y)+1, abs(y-i)+abs(x-j)+1)
            
            ans[d-1] += 1
print(*ans, sep="\n")

Solution (Python):
N,X,Y = map(int,input().split())
length = [0]*(N+1)
for i in range(1,N+1):
  for j in range(i,N+1):
    ans = min(abs(j-i),abs(X-i)+1+abs(Y-j),abs(X-j)+1+abs(Y-i))
    length[ans] += 1
for i in range(1,N):
  print(length[i])

Solution (Python):
n, x, y = map(int, input().split())
ans = [0] * (n-1)
for i in range(1, n):
    for j in range(i+1, n+1):
        
        d = min(j-i, abs(x-i)+abs(j-y)+1, abs(y-i)+abs(x-j)+1)
        
        ans[d-1] += 1
print(*ans, sep="\n")

Solution (Python):
from collections import deque
from collections import defaultdict


class Graph(object):
    """
    隣接リストによる無向グラフ
    重み無しで距離は１
    """

    def __init__(self):
        self.graph = defaultdict(list)

    def __len__(self):
        return len(self.graph)

    def add_edge(self, src, dst):
        self.graph[src].append(dst)
        self.graph[dst].append(src)

    def get_nodes(self):
        return self.graph.keys()


if __name__ == "__main__":
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1

    g = Graph()
    for i in range(n-1):
        g.add_edge(i, i+1)
    g.add_edge(x, y)

    ans = [0] * (n-1)

    
    for i in range(n-1):
        
        
        dist = [-1] * n

        
        
        dist[i] = 0
        que = deque([i])

        while len(que) != 0:
            vertex = que.popleft()
            for v in g.graph[vertex]:
                if dist[v] != -1:
                    pass
                else:
                    tmp = dist[vertex] + 1
                    dist[v] = tmp
                    if v > i:
                        ans[tmp-1] += 1
                    que.extend(g.graph[vertex])

    for a in ans:
        print(a)

Solution (Python):
N,X,Y = map(int, input().split())
X = X-1
Y = Y-1
kyori  = [0]*N
for i in range(N):
    for j in range(i+1,N):
        l = min(abs(i-j), abs(i-X)+1+abs(j-Y), abs(i-Y)+1+abs(j-X))
        kyori[l] += 1
for k in range(1,N):
    print(kyori[k])

Solution (Python):
N,X,Y = list(map(int,input().split()))


ansli = [0] * (N)
for i in range(1,N):
    for j in range(i+1,N+1):
        ansli[min(abs(j-i),abs(X-i)+1+abs(Y-j))]+=1

for k in range(N):
    if k==0:
        continue

    print(ansli[k])

Solution (Python):
N, X, Y = list(map(int, input().split()))
result = {N-i:0 for i in range(1, N)}

for i in range(1, N):
  for j in range(i + 1, N + 1):
    dis = min([j - i, abs(j - Y) + abs(i - X) + 1, abs(j - X) + abs(i - Y) + 1])
    result[dis] += 1
print("\n".join(list(map(str, result.values()))))

Solution (Python):
from itertools import combinations

n, x, y = map(int, input().split())
x -= 1
y -= 1
dist = [0] * n

for i, j in combinations(list(range(n)), 2):
    num = min((abs(x - i) + 1 + abs(y - j)), (abs(y - i) + 1 + abs(x - j)), abs(i - j))
    dist[num] += 1

for i in range(1, n):
    print(dist[i])

Solution (Python):



N,X,Y = list(map(int, input().split()))




k_list = [0 for i in range(1,N)]
for i in range(1, N):
    for j in range(i+1, N+1):
        min_path = min([abs(j-i), abs(X-i)+1+abs(j-Y)])
        k_list[min_path-1] += 1


for k in k_list:
    print(k)

Solution (Python):
from collections import deque, defaultdict

N, X, Y = map(int, input().split())


tree = [[] for _ in range(N)]
for i in range(N-1):
    tree[i].append(i+1)
    tree[i+1].append(i)
tree[X-1].append(Y-1)
tree[Y-1].append(X-1)
ans = defaultdict(int)
q = deque()

for i in range(N):
    distant = [N]*N
    q.append(i)  
    distant[i] = 0
    while len(q):
        
        v = q.pop()
        for e in tree[v]:
            if distant[e] < distant[v]+1:  
                continue
            distant[e] = min(distant[v]+1, distant[e])
            q.append(e)
    for d in distant:
        ans[d] += 1
for i in range(1, N):
    print(ans[i]//2)

Solution (Python):
from collections import deque, defaultdict

N, X, Y = map(int, input().split())


tree = [[] for _ in range(N)]
for i in range(N-1):
    tree[i].append(i+1)
    tree[i+1].append(i)
tree[X-1].append(Y-1)
tree[Y-1].append(X-1)
ans = defaultdict(int)
q = deque()

for i in range(N):
    distant = [N]*N
    q.append(i)  
    distant[i] = 0
    while len(q):
        
        v = q.pop()
        for e in tree[v]:
            if distant[e] < distant[v]+1:  
                continue
            distant[e] = distant[v]+1
            q.append(e)
    for d in distant:
        ans[d] += 1
for i in range(1, N):
    print(ans[i]//2)

Solution (Python):
n, x, y = map(int, input().split())
l = [0]*n

for i in range(1, n):
    for j in range(i + 1, n + 1):
        diff1 = j - i
        diff2 = abs(x - i) + abs(y - j) + 1
        diff = min(diff1, diff2)
        l[diff] = l[diff] + 1

for i in range(1, n):
    print(l[i])

Solution (Python):
n, x, y = map(int, input().split())
x -= 1
y -= 1

cnt_list = [0] * (n - 1)

for i in range(n):
    for j in range(n):
        if j <= i:
            continue
        
        
        num = min([j - i, abs(x - i) + 1 + abs(y - j)]) - 1 
        cnt_list[num] += 1

for n in cnt_list:
    print(n)

Solution (Python):

import collections


def solve():
    N, X, Y = map(int, input().split())

    inf = 10**9

    
    def pus(v, d, dist, q):
        if dist[v] == inf:
            dist[v] = d
            q.append(v)
        return 0

    ans = [0]*N

    for i in range(N):
        q = collections.deque()
        dist = [inf]*N
        pus(i, 0, dist, q)

        while(len(q)):
            v = q.popleft()
            d = dist[v]

            if v-1 >= 0:
                pus(v-1, d+1, dist, q)
            if v+1 < N:
                pus(v+1, d+1, dist, q)
            if v == X-1:
                pus(Y-1, d+1, dist, q)
            if v == Y-1:
                pus(X-1, d+1, dist, q)

        for i in range(N):
            ans[dist[i]] += 1

    [print(ans[i]//2) for i in range(1, N)]


if __name__ == "__main__":
    solve()

Solution (Python):
from collections import deque, Counter

INF = float("inf")

N, X, Y = map(int, input().split())

E = [[] for _ in range(N + 1)]
for i in range(1, N):
    E[i].append(i + 1)
    E[i + 1].append(i)
E[X].append(Y)
E[Y].append(X)

C = Counter()
for s in range(1, N + 1):
    dist = [INF] * (N + 1)
    dist[s] = 0
    Q = deque([s])
    while Q:
        p = Q.popleft()
        for c in E[p]:
            if dist[c] > dist[p] + 1:
                dist[c] = dist[p] + 1
                Q.append(c)
    C.update(dist)

for k in range(1, N):
    print(C[k] // 2)

Solution (Python):
n, x, y = map(int, input().split())
ans = [0]*n
x, y = min(x, y), max(x, y)
 
for i in range(1, n):
    for j in range(i+1, n+1):
        
        dist = j - i
        dist = min(dist, abs(j - y) + abs(x - i) + 1)
        dist = min(dist, abs(j - x) + abs(y - i) + 1)
        ans[dist] += 1
print("\n".join(list(map(str, ans[1:]))))

Solution (Python):
N,X,Y=map(int,input().split())

X-=1
Y-=1

dist=[0]*(N+1)


for i in range(N):
    for j in range(i+1,N):
        dist[(min(abs(i-j),abs(i-Y)+abs(X-j)+1,abs(i-X)+abs(Y-j)+1))]+=1
for d in range(1,N):
    print(dist[d])

Solution (Python):
n,x,y = map(int, input().split())
x -= 1
y -= 1

ans = [0] * (n-1)

for j in range(n):
  for i in range(j):
    ans[min(j-i, abs(x-i)+1+abs(j-y)) - 1] += 1

print("\n".join([str(d) for d in ans]))

Solution (Python):
n, x, y = map(int, input().split())
x -= 1
y -= 1

ans = [0] * n

for j in range(n):
  for i in range(j):
    d = min(j-i, abs(x-i)+1+abs(j-y))
    ans[d] += 1

print( "\n".join( [str(d) for d in ans[1:]] ))

Solution (Python):
n,x,y = map(int,input().split())
d = [0 for i in range(0,n)]
for i in range(1,n+1):
    for j in range(i+1,n+1):
        dist = min(j-i, abs(i-x) +1 + abs(j-y))
        d[dist]+=1
for i in range(1,n):
    print(d[i])

Solution (Python):

import sys
import collections
from collections import deque


def solve(N: int, X: int, Y: int):
    seen = [[False] * N] * N
    X -= 1
    Y -= 1
    cnt = []
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            if seen[i][j]:
                continue
            seen[j][i] = True
            cnt.append(min(abs(j - i), abs(X - i) + 1 + abs(j - Y)))
    counter = collections.Counter(cnt)
    keys = counter.keys()
    for i in range(N):
        if i not in keys:
            print(0)
            continue
        print(counter[i])
    return


def solve2(N: int, X: int, Y: int):
    
    X -= 1
    Y -= 1
    G = [[] for _ in range(N)]
    for i in range(N):
        if not i == N - 1:
            G[i].append(i+1)
            G[i+1].append(i)
        if i == X:
            G[i].append(Y)
            G[Y].append(i)
        if i == Y:
            G[i].append(X)
            G[X].append(i)
    G = [list(set(x)) for x in G]
    q = deque([])
    ans = [0] * N
    
    for i in range(N):
        dist = [-1] * N
        dist[i] = 0
        q.append(i)
        while(len(q) > 0):
            v = q.pop()
            for nv in G[v]:
                if not dist[nv] == -1:
                    continue
                dist[nv] = dist[v] + 1
                q.appendleft(nv)
        for d in dist:
            ans[d] += 1
    for i in range(N):
        ans[i] //= 2
    for i in range(1, N):
        print(ans[i])
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    X = int(next(tokens))  
    Y = int(next(tokens))  
    solve2(N, X, Y)

if __name__ == '__main__':
    main()

Solution (Python):
"""
    Template written to be used by Python Programmers.
    Use at your own risk!!!!
    Owned by enraged(rating - 5 star at CodeChef and Specialist at Codeforces).
"""
import sys
from functools import lru_cache
from collections import defaultdict as dd
def data(): return sys.stdin.readline().strip()
def out(var): sys.stdout.write(str(var))
def outln(var): sys.stdout.write(str(var)+"\n")
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, x, y = sp()
dp = dd(int)
for i in range(1, n):
    for j in range(i+1, n+1):
        answer = min(abs(j-i), abs(x-i)+1+abs(j-y), abs(y-i)+1+abs(j-x))
        dp[answer] += 1
for i in range(1, n):
    outln(dp[i])

Solution (Python):
from sys import stdin
from collections import deque
from collections import Counter
N,X,Y = [int(x) for x in stdin.readline().rstrip().split()] 
ans = Counter()

for k in range(1,N+1):
    dist = [0] + [10**9]*(N)
    visited = [False for i in range(N+1)]
    visit_p = deque()
    visit_p.append((k,0))

    while visit_p:
        
        node,cnt = visit_p.popleft()
        dist[node] = min(cnt,dist[node])

        if node == X:
            
            if not visited[Y]:
                visit_p.append((Y,cnt+1))
                visited[Y] = True

        if node == Y:
            
            if not visited[X]:
            
                visit_p.append((X,cnt+1))
                visited[X] = True
        
        for d in [-1,1]:
            if node + d < 1 or node + d > N:
                continue
            if visited[node+d]:
                continue
            
            
            visited[node+d] = True
            visit_p.append((node+d,cnt+1))
        
    ans += Counter(dist)
    
for i in range(1,N):
    print(ans[i]//2)

Solution (Python):
n,x,y=map(int,input().split())
ans=[0]*(n-1)
for i in range(n):
  for j in range(i+1,n):
    nagasa=min(abs(j-i),(abs(x-(i+1))+1+abs((j+1)-y)),(abs(y-(i+1))+1+abs((j+1)-x)))
    
    ans[nagasa-1]+=1
for i in range(n-1):
  print(ans[i])

Solution (Python):
n, x, y = map(int, input().split())
x -= 1
y -= 1

List = [0 for i in range(n)]

for i in range(n - 1):
    for j in range(i + 1, n):
        distance = min(j - i, abs(x - i) + 1 + abs(j - y))
        List[distance] += 1

for index in range(1, len(List)):
    print(List[index])

Solution (Python):
N,X,Y=map(int,input().split())
A=[]
for i in range(N-1):
    A.append([-1]*(N-1-i))

Ndmin=[0]*(N-1)
for i in range(N-1):
    for j in range(i+1,N):
        Ndmin[min(j-i,abs(X-i-1)+1+abs(Y-j-1),abs(X-j-1)+1+abs(Y-i-1))-1]+=1

for k in range(N-1):
    print(Ndmin[k])

Solution (Python):
from collections import deque

N,X,Y=map(int,input().split())

Ndmin=[0]*(N-1)
for i in range(1,N):
    tmp=deque([i])
    dmin=deque([0])
    Dmin=[10000]*(N)
    while tmp:
        E=tmp.popleft()
        d=dmin.popleft()
        Dmin[E-1]=min(d,Dmin[E-1])
        if E<N:
            if d+1<Dmin[E]:
                tmp.append(E+1)
                dmin.append(d+1)
        if E>1:
            if d+1<Dmin[E-2]:
                tmp.append(E-1)
                dmin.append(d+1)
        if E==X and d+1<Dmin[Y-1]:
            tmp.append(Y)
            dmin.append(d+1)
        if E==Y and d+1<Dmin[X-1]:
            tmp.append(X)
            dmin.append(d+1)
        
    for ii in range(i,N):
        Ndmin[Dmin[ii]-1]+=1

for i in range(N-1):
    print(Ndmin[i])

Solution (Python):
from collections import deque

N,X,Y=map(int,input().split())

Ndmin=[0]*(N-1)
for i in range(1,N):
    tmp=deque([i])
    dmin=deque([0])
    Dmin=[10000]*(N)
    while tmp:
        E=tmp.popleft()
        d=dmin.popleft()
        Dmin[E-1]=min(d,Dmin[E-1])
        if E<N:
            if d+1<Dmin[E]:
                tmp.append(E+1)
                dmin.append(d+1)
        if E>1:
            if d+1<Dmin[E-2]:
                tmp.append(E-1)
                dmin.append(d+1)
        if E==X and d+1<Dmin[Y-1]:
            tmp.append(Y)
            dmin.append(d+1)
        if E==Y and d+1<Dmin[X-1]:
            tmp.append(X)
            dmin.append(d+1)
        
    for ii in range(i,N):
        Ndmin[Dmin[ii]-1]+=1

for i in range(N-1):
    print(Ndmin[i])

Solution (Python):
import unittest


class TestD(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(5, 2, 4), [5, 4, 1, 0])

    def test_2(self):
        self.assertEqual(think(3, 1, 3), [3, 0])

    def test_3(self):
        self.assertEqual(think(7, 3, 7), [7, 8, 4, 2, 0, 0])

    def test_4(self):
        self.assertEqual(think(10, 4, 8), [10, 12, 10, 8, 4, 1, 0, 0, 0])


def solve():
    n, x, y = read()
    result = think(n, x, y)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n, x, y):
    result = [0] * n
    for i in range(1, n):
        for j in range(i + 1, n + 1):
            minimum_distance = min(j - i, 1 + abs(x - i) + abs(y - j))
            result[minimum_distance] += 1
    return result[1:]


def write(result):
    for r in result:
        print(r)


if __name__ == '__main__':
    
    solve()

Solution (Python):
from scipy.sparse.csgraph import dijkstra
import numpy as np 

N,X,Y = map(int,input().split())

edge = tuple([0]*N for i in range(N))

for i in range(N-1):
    edge[i][i+1] = 1
    edge[i+1][i] = 1

edge[X-1][Y-1] = 1
edge[Y-1][X-1] = 1

ans = np.array(dijkstra(edge),dtype="int32")
cnt = [0]*N
for i in range(N):
    for j in ans[i]:
        cnt[j] += 1

for i in range(1,N):
    print(cnt[i]//2)

Solution (Python):
from scipy.sparse.csgraph import dijkstra
import numpy as np 

N,X,Y = map(int,input().split())

edge = tuple([0]*N for i in range(N))

for i in range(N-1):
    edge[i][i+1] = 1
    edge[i+1][i] = 1

edge[X-1][Y-1] = 1
edge[Y-1][X-1] = 1

edge_n = np.array(edge)
ans = dijkstra(edge_n)
ans = np.array(ans,dtype="int32")
cnt = [0]*N
for i in range(N):
    for j in ans[i]:
        cnt[j] += 1

for i in range(1,N):
    print(cnt[i]//2)

Solution (Python):
N, X, Y = map(int, input().split())
X, Y = X - 1, Y - 1

ans = [0] * (N - 1)
for i in range(N - 1):
    for j in range(i + 1, N):
        d = min(j - i, abs(X - i) + 1 + abs(Y - j),
                abs(Y - i) + 1 + abs(X - j))
        ans[d - 1] += 1

for k in range(N - 1):
    print(ans[k])

Solution (Python):
from scipy.sparse.csgraph import dijkstra
import numpy as np 

N,X,Y = map(int,input().split())

edge = [[0]*N for i in range(N)]

for i in range(N-1):
    edge[i][i+1] = 1
    edge[i+1][i] = 1

edge[X-1][Y-1] = 1
edge[Y-1][X-1] = 1

edge_n = np.array(edge)
ans = dijkstra(edge_n)
ans = np.array(ans,dtype="int32")
cnt = [0]*N
for i in range(N):
    for j in ans[i]:
        cnt[j] += 1

for i in range(1,N):
    print(cnt[i]//2)

Solution (Python):
n,x,y=map(int,input().split())
def dis(i,j):
  return min(j-i,abs(j-y)+abs(i-x)+1)-1
ans=[0]*(n-1)
for i in range(1,n):
  for j in range(i+1,n+1):
    ans[dis(i,j)]+=1
for i in range(len(ans)):
  print(ans[i])

Solution (Python):

from collections import deque

INF = 1001001001

n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = [0]*n

for i in range(n):
    dist = [INF]*n
    q = deque()
    dist[i] = 0
    q.append(i)
    
    while len(q)>0:
        v = q.popleft()
        d = dist[v]
        if v-1 >= 0 and dist[v-1]==INF:
            q.append(v-1)
            dist[v-1]=d+1
        if v+1 < n and dist[v+1]==INF:
            q.append(v+1)
            dist[v+1]=d+1
        if v==x and dist[y]==INF:
            q.append(y)
            dist[y]=d+1
        if v==y and dist[x]==INF:
            q.append(x)
            dist[x]=d+1
    for d in dist:
        ans[d] += 1

for a in ans[1:]:
    print(int(a//2))

Solution (Python):
N, x, y = [int(i) for i in input().split()]

cnt = [0] * N
for i in range(1, N+1):
  for j in range(i+1, N+1):
    temp = min(abs(j-i), abs(x-i) + 1 + abs(j-y), abs(y-i) + 1 + abs(j-x))
    cnt[temp] += 1

for i in range(1, N):
  print(cnt[i])

Solution (Python):
n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = [0] * n

for s in range(n):
    for t in range(s, n):
        u = min((t-s), abs(x-s) + 1 + abs(y-t), abs(x-t) + 1 + abs(y-s))
        ans[u] += 1

for _ in ans[1:]:
    print(_)

Solution (Python):
'''
ID: essi
LANG: PYTHON3
TASK: ‌D.py
''' 


n, x, y = map(int,input().split())
k = [0] * n
k[0] = n 
for i in range(1, n):
	for j in range(i + 1, n + 1):
		if x > j:
			k[j - i]+= 1
		else:
			way = abs(i-x) + 1 + abs(y-j)
			
			k[min(j - i, way)]+= 1	
for i in range(1, n):
	print(k[i])