Buggy python submission (verdict: Time Limit Exceeded):
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):
        a1=abs(i-j)
        a2=abs(x-i)+1+abs(y-j)
        a3=abs(y-i)+1+abs(x-j)    
        d=min(a1,a2,a3)
        ans[d]+=1
for i in range(1,n):
    print(ans[i])

Fixed submission:
n,x,y=map(int,input().split())
ans=[0]*n #個数を数えるのにバケットを用意する
for i in range(1,n+1): #i<jなるすべての頂点の組について最短距離を求める
 for j in range(i+1,n+1):
   dist1=j-i
   dist2=abs(x-i)+abs(y-j)+1
   dist3=abs(y-i)+abs(x-j)+1
   d=min(dist1,dist2,dist3) #最短距離は上式により求められる
   ans[d]+=1 #最短距離がdとなる組の個数を1増やす
for i in range(1,n):
 print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
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):
        a1=abs(i-j)
        a2=abs(x-i)+1+abs(y-j)
        a3=abs(y-i)+1+abs(x-j)
        d=min(a1,a2,a3)
        ans[d]+=1

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

Fixed submission:
n,x,y=map(int,input().split())
ans=[0]*n #個数を数えるのにバケットを用意する
for i in range(1,n+1): #i<jなるすべての頂点の組について最短距離を求める
 for j in range(i+1,n+1):
   dist1=j-i
   dist2=abs(x-i)+abs(y-j)+1
   dist3=abs(y-i)+abs(x-j)+1
   d=min(dist1,dist2,dist3) #最短距離は上式により求められる
   ans[d]+=1 #最短距離がdとなる組の個数を1増やす
for i in range(1,n):
 print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
import heapq

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

Edge = [[] for _ in range(n+1)]
for i in range(1,n):
    Edge[i].append([1, i+1])
    Edge[i+1].append([1, i])

Edge[x].append([1,y])
Edge[y].append([1,x])

def dijkstra_heap(s):
    # 始点sから各頂点への最短距離
    d = [10**10] * (n+1)
    used = [False] * (n+1)
    d[s] = 0
    used[s] = True
    edgelist = []
    
    # edgeは各頂点の[重み、行先]からなる配列
    for e in Edge[s]:
        heapq.heappush(edgelist, e)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)

        # 未使用の頂点から最小の距離のものを探す
        if used[minedge[1]] == True:
            continue
        v = minedge[1]
        d[v] = minedge[0]
        used[v] = True

        for e in Edge[v]:
            if used[e[1]] == False:
                heapq.heappush(edgelist, [e[0]+d[v], e[1]])
    return d

Ans = [0 for _ in range(n+1)]
for i in range(1,n):
    Dist = dijkstra_heap(i)
    # print(Dist)
    for dist in Dist[i:]:
        Ans[dist] += 1

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


Fixed submission:
import heapq

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

Edge = [[] for _ in range(n+1)]
for i in range(1,n):
    Edge[i].append([1, i+1])
    Edge[i+1].append([1, i])

Edge[x].append([1,y])
Edge[y].append([1,x])

def dijkstra_heap(s):
    # 始点sから各頂点への最短距離
    d = [10**10] * (n+1)
    used = [False] * (n+1)
    d[s] = 0
    used[s] = True
    edgelist = []
    
    # edgeは各頂点の[重み、行先]からなる配列
    for e in Edge[s]:
        heapq.heappush(edgelist, e)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)

        # 未使用の頂点から最小の距離のものを探す
        if used[minedge[1]] == True:
            continue
        v = minedge[1]
        d[v] = minedge[0]
        used[v] = True

        for e in Edge[v]:
            if used[e[1]] == False:
                heapq.heappush(edgelist, [e[0]+d[v], e[1]])
    return d

Ans = [0 for _ in range(n+1)]
for i in range(1,n):
    Dist = dijkstra_heap(i)
    # print(Dist)
    for dist in Dist[i:]:
        Ans[dist] += 1

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