qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# import sys
# import numpy as np

# S = input()
# N, M = map(int, input().split())
# As = [int(input()) for _ in range(N)]
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]


def main():
    solve()


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

    ans_list = [0 for _ in range(N)]
    for i in range(N-1):
        for j in range(i+1, N):
            dist1 = j-i
            dist2 = abs(X-i-1) + 1 + abs(Y-j-1)

            ans = min(dist1, dist2)
            ans_list[ans] += 1

    for n in ans_list:
        print(n)

    return


if __name__ == '__main__':
    main()


Fixed code:
# import sys
# import numpy as np

# S = input()
# N, M = map(int, input().split())
# As = [int(input()) for _ in range(N)]
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]


def main():
    solve()


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

    ans_list = [0 for _ in range(N)]
    for i in range(N-1):
        for j in range(i+1, N):
            dist1 = j-i
            dist2 = abs(X-i-1) + 1 + abs(Y-j-1)

            ans = min(dist1, dist2)
            ans_list[ans] += 1

    for n in ans_list[1:]:
        print(n)

    return


if __name__ == '__main__':
    main()
Buggy code:
# -*- coding: utf-8 -*-
import collections
N,X,Y = map(int,input().split())
ToltN=N*(N-1)/2
Dist=[[0 for i in range(N)] for i in range(N)]
for i in range(N):
    for j in range(i,N):
        Dist[i][j] = j-i
        MyDist=abs(i-(X-1))+abs(j-(Y-1))+1
        if MyDist<Dist[i][j]:
            Dist[i][j]=MyDist
for j in range(N-1):
    ans=[0]
    for i in range(N):
        ans+=Dist[i]
c = collections.Counter(ans)
for i in range(N):
    print(c[i])


Fixed code:
# -*- coding: utf-8 -*-
import collections
N,X,Y = map(int,input().split())
ToltN=N*(N-1)/2
Dist=[[0 for i in range(N)] for i in range(N)]
c=[0]*N
for i in range(N):
    for j in range(i+1,N):
        MyDist=abs(i-(X-1))+abs(j-(Y-1))+1
        if MyDist<j-i:
            Dist[i][j]=MyDist
            c[MyDist-1]+=1
        else:
            Dist[i][j] = j-i
            c[j-i-1]+=1
for i in range(N-1):
    print(c[i])
Buggy code:
n, x, y = map(int, input().split())
lis = [0]*(n-1)
print(lis)
for i in range(1, n):
    for j in range(i+1, n+1):
        lis[min([j-i, abs(x-i)+1+abs(y-j), abs(y-i)+1+abs(x-j)])-1] += 1
for i in range(n-1):
    print(lis[i])

Fixed code:
n,x,y = map(int, input().split())
k = [0] * n
for i in range(1,n):
  for j in range(i+1,n+1):
    index = min(j-i,abs(x-i)+abs(y-j)+1)
    k[index] += 1
for i in k[1:]:
  print(i)
Buggy code:
N, X, Y= map(int, input().split())
K = [0]*N
for i in range(1,N):
    for j in range(i+1, N+1):
        idx = min([j-i, abs(X-i)+ abs(j-Y)+1, abs(Y-i) + 1 + abs(X-j)])    
        K[idx] +=1
for value in K:
    print(value)

Fixed code:
N, X, Y= map(int, input().split())
K = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1, N+1):
        idx = min([j-i, abs(X-i)+ abs(j-Y)+1, abs(Y-i) + 1 + abs(X-j)])-1
        K[idx] +=1
for value in K:
    print(value)
Buggy code:
n, x, y = map(int, input().split())
x -= 1
y -= 1

k = [0 for _ in range(n)]
for i in range(n):
    for j in range(i + 1, n):
        dist = min(j-i, abs(x-i)+1+abs(j-y))
        if dist < n:
            k[dist] += 1
[for i in range(1, len(k)):
    print(k[i])]


Fixed code:
n, x, y = map(int, input().split())
x -= 1
y -= 1

k = [0 for _ in range(n)]
for i in range(n):
    for j in range(i + 1, n):
        dist = min(j-i, abs(x-i)+1+abs(j-y))
        if dist < n:
            k[dist] += 1
for i in range(1, len(k)):
    print(k[i])
Buggy code:
def main():
    n,x,y=map(int,input().split())
    dist=[0]*n
    x-=1
    y-=1
    for i in range(n-1):
        for j in range(i+1,n):
            d=j-i
            dist[min(d,abs(x-i)+abs(y-j)+1)-1]+=1
    for i in dist:
        print(i)

if __name__ == '__main__':
    main()

Fixed code:
def main():
    n,x,y=map(int,input().split())
    dist=[0]*(n-1)
    x-=1
    y-=1
    for i in range(n-1):
        for j in range(i+1,n):
            d=j-i
            dist[min(d,abs(x-i)+abs(y-j)+1)-1]+=1

    for i in dist:
        print(i)

if __name__ == '__main__':
    main()
Buggy code:
def main():
    import sys
    import collections
    
    N, X, Y = map(int, sys.stdin.readline().split())
    
    dist_list = []
    
    if X == 1 and Y == N:
        for _ in range(1, N):
            print(N)
    
    else:
        for i in range(1, N):
            for j in range(i + 1, N + 1):
                if j <= X or i >= Y:
                    dist_list.append(j - i)
                else:
                    dist = min(j - i, abs(X - i) + abs(j - Y) + 1)
                    dist_list.append(dist)
                    
        
        c = collections.Counter(dist_list)
        for i in range(1, N):
            print(c[i])
            
if __name__ == '__main__':
    main()

Fixed code:
def main():
    import sys
    import collections
    
    N, X, Y = map(int, sys.stdin.readline().split())
    
    dist_list = []
    
    if X == 1 and Y == N:
        for i in range(1, N):
            for j in range(i + 1, N + 1):
                dist = min(j - i, N - j + i)
                dist_list.append(dist)
        
        c = collections.Counter(dist_list)
        for i in range(1, N):
            print(c[i])
    
    else:
        for i in range(1, N):
            for j in range(i + 1, N + 1):
                if j <= X or i >= Y:
                    dist_list.append(j - i)
                else:
                    dist = min(j - i, abs(X - i) + abs(j - Y) + 1)
                    dist_list.append(dist)
                    
        
        c = collections.Counter(dist_list)
        for i in range(1, N):
            print(c[i])
            
if __name__ == '__main__':
    main()
Buggy code:
from collections import defaultdict
from collections import deque

n,x,y = map(int,input().split())
print(n)
graph=[[] for _ in range(n)]

for i in range(1,n+1):
    if i!=x:
        if i == 1:
            graph[i-1].append(i+1)
        elif i == n:
            graph[i-1].append(i-1)
        else:
            graph[i-1].append(i-1)
            graph[i-1].append(i+1)
    else:
        graph[i-1].append(y)
        if i == 1:
            graph[i-1].append(i+1)
        elif i == n:
            graph[i-1].append(i-1)
        else:
            graph[i-1].append(i-1)
            graph[i-1].append(i+1)
k_dic=defaultdict(int)

for i in range(1,n):
    q = deque([[i]])
    prev = [0]*n
    prev[i-1] = 1
    dic=defaultdict(int)
    while q:
        now_l = q.popleft()
        tu = []
        for now in now_l:
            nex = graph[now-1]
            
            for ne in nex:
                if prev[ne-1] == 0:
                
                    tu.append(ne)
                    q.append(tu)
                    prev[ne-1] = 1
                    dic[ne] = dic[now]+1
                    if ne > i:
                        k_dic[dic[ne]] += 1

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




Fixed code:
from collections import defaultdict
from collections import deque

n,x,y = map(int,input().split())
graph=[[] for _ in range(n)]

for i in range(1,n+1):
    if i!=x:
        if i == 1:
            graph[i-1].append(i+1)
        elif i == n:
            graph[i-1].append(i-1)
        else:
            graph[i-1].append(i-1)
            graph[i-1].append(i+1)
    else:
        graph[i-1].append(y)
        if i == 1:
            graph[i-1].append(i+1)
        elif i == n:
            graph[i-1].append(i-1)
        else:
            graph[i-1].append(i-1)
            graph[i-1].append(i+1)
k_dic=defaultdict(int)

for i in range(1,n):
    q = deque([[i]])
    prev = [0]*n
    prev[i-1] = 1
    dic=defaultdict(int)
    while q:
        now_l = q.popleft()
        tu = []
        for now in now_l:
            nex = graph[now-1]
            
            for ne in nex:
                if prev[ne-1] == 0:
                
                    tu.append(ne)
                    q.append(tu)
                    prev[ne-1] = 1
                    dic[ne] = dic[now]+1
                    if ne > i:
                        k_dic[dic[ne]] += 1

for i in range(1,n):
    print(k_dic[i])
Buggy code:
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):
        ans[min(abs(j - i), abs(x - i) + 1 + abs(y - j), abs(x - j) + 1 + abs(y - i))] += 1

for e in ans:
    print(e)


Fixed code:
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):
        ans[min(abs(j - i), abs(x - i) + 1 + abs(y - j), abs(x - j) + 1 + abs(y - i))] += 1

for e in ans[1:]:
    print(e)
Buggy code:
n,x,y=map(int,input().split())
x-=1
y-=1
a=[]
for i in range(n):
  a.append(0)
for i in range(n):
  for j in range(n-i):
    p=min(abs(j-i),abs(x-i)+abs(y-j)+1,abs(y-i)+abs(x-j)+1)
    a[p]+=1
for i in range(n-1):
  print(str(a[i+1]))

Fixed code:
n,x,y=map(int,input().split())
x-=1
y-=1
a=[]
for i in range(n):
  a.append(0)
for i in range(n-1):
  for j in range(n-i):
    j=n-1-j
    p=min(abs(j-i),abs(x-i)+abs(y-j)+1,abs(y-i)+abs(x-j)+1)
    a[p]+=1
for i in range(n-1):
  print(str(a[i+1]))
Buggy code:
n,x,y=map(int, input().split())

ans=[0]*n-1

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

for a in ans:
    print(a)

Fixed code:
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):
        d=min(j-i, abs(x-i)+1+abs(j-y), abs(y-i)+1+abs(j-x))
        #print(i,j,d)
        ans[d-1]+=1

for a in ans:
    print(a)
Buggy code:
N,X,Y =map(int,input().split())

count = [int(0)] * (N-1)


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


print("\n".join(map(str,count)))

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

count = [0] * (N-1)


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


print("\n".join(map(str,count)))
Buggy code:
N, X, Y = map(int, input().split())
X -= 1
Y -= 1

def dist(a, b):
    return min(abs(b-a), abs(X-a) + 1 + abs(b-Y))

ANS = [0] * N
for i in range(N):
    for j in range(i):
        ANS[dist(i, j)] += 1

for a in ANS[1:]:
    print(a)

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

def dist(a, b):
    return min(abs(b-a), abs(X-a) + 1 + abs(b-Y), abs(Y-a) + 1 + abs(b-X))

ANS = [0] * N
for i in range(N):
    for j in range(i):
        ANS[dist(i, j)] += 1

for a in ANS[1:]:
    print(a)
Buggy code:
N, X, Y = map(int, input().split())
dist_list = []*N

for i in range(N):
    for j in range(i+1, N):
        a = j - i
        b = abs(i+1 - X) + abs(j+1 -Y) + 1
        dist_list[min(a,b)] += 1
        
for k in range(N-1):
    print(dist_list.count(k+1))



Fixed code:
N, X, Y = map(int, input().split())
dist_list = [0]*N

for i in range(N-1):
    for j in range(i+1, N):
        a = j - i
        b = abs(i+1 - X) + abs(j+1 -Y) + 1
        dist_list[min(a,b)] += 1

for k in range(N-1):
    print(dist_list[k+1])
Buggy code:
n,x,y=map(int,input().split())
ans=[0]*n
for i in range(1,n):
    for j in range(i+1,n+1):
        a=min(j-i,abs(j-y)+1+abs(x-i),abs(y-i)+1+abs(x-j))
        ans[a]+=1
for i in range(ans):
    print(ans[i])

Fixed code:
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):
        a=min(j-i,abs(j-y)+1+abs(x-i),abs(y-i)+1+abs(x-j))-1
        ans[a]+=1
for i in range(len(ans)):
    print(ans[i])
Buggy code:
n,x,y = map(int, input().split())
l = [0]*(n+1)
for i in range(1,n+1):
    for j in range(1,i):#j<i
        a = min(i-j,abs(x-j)+abs(y-i)+1)
        l[a] += 1
        print(j,i,a)
for i in range(1,n):
    print(l[i])

Fixed code:
n,x,y = map(int, input().split())
l = [0]*(n+1)
for i in range(1,n+1):
    for j in range(1,i):#j<i
        a = min(i-j,abs(x-j)+abs(y-i)+1)
        l[a] += 1
for i in range(1,n):
    print(l[i])
Buggy code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
n,x,y = [int(i) for i in readline().split()]

ans = [0] * n

for a in range(1, n+1):
    for b in range(a+1, n+1):
        d = b - a
        d2 = abs(X-a) + abs(Y-b) + 1
        d = d if d < d2 else d2
        ans[d] += 1

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

Fixed code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
n,x,y = [int(i) for i in readline().split()]

ans = [0] * n

for a in range(1, n+1):
    for b in range(a+1, n+1):
        d = b - a
        d2 = abs(x-a) + abs(y-b) + 1
        d = d if d < d2 else d2
        ans[d] += 1

for i in range(1, n):
    print(ans[i])
Buggy code:
n, x, y = input().split()
n, x, y = int(n), int(x)-1, int(y)-1
d = [[abs(i-j) for i in range(n)] for j in range(n)]
for i in range(x+1):
    for j in range(y, n):
        d[i][j] -= y-x-1
    for j in range(y-1, x+(y-x)//2, -1):
        d[i][j] = d[i][j+1]+1
for i in range(x+1, x+(y-x)//2):
    d[i][y] = d[i][x] + 1
    for j in range(y+1, n):
        d[i][j] = d[i][j-1]+1
    for j in range(y-1, x+(y-x)//2+1, -1):
        d[i][j] = d[i][j+1]+1
print(d)
apar = [0 for i in range(n)]
for i in range(n-1):
    for j in range(i+1, n):
        apar[d[i][j]] += 1
for i in range(1, n):
    print(apar[i])


Fixed code:
n, x, y = input().split()
n, x, y = int(n), int(x)-1, int(y)-1
d = [[abs(i-j) for i in range(n)] for j in range(n)]
for i in range(x+1):
    for j in range(y, n):
        d[i][j] -= y-x-1
    for j in range(y-1, x+(y-x)//2, -1):
        d[i][j] = d[i][j+1]+1
for i in range(x+1, x+(y-x)//2):
    d[i][y] = d[i][x] + 1
    for j in range(y+1, n):
        d[i][j] = d[i][j-1]+1
    for j in range(y-1, x+(y-x)//2+(i-x), -1):
        d[i][j] = d[i][j+1]+1
apar = [0 for i in range(n)]
for i in range(n-1):
    for j in range(i+1, n):
        apar[d[i][j]] += 1
for i in range(1, n):
    print(apar[i])
Buggy code:
from collections import Counter
N, X, Y = map(int, input().split())
ans = []

for i in range(N):
    for j in range(i+1, N):
        ans.append(min(j-i, 1+abs(i-X)+abs(j-Y)))

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


Fixed code:

from itertools import combinations
from collections import Counter
N, X, Y = map(int, input().split())
X, Y = X-1, Y-1
ans = []
for i, j in combinations(range(N), 2):
    ans.append(min(j-i, 1+abs(i-X)+abs(j-Y)))
c = Counter(ans)
for i in range(1,N):
    print(c[i])
Buggy code:
n,x,y = map (int ,input().split())

x = x-1
y = y-1

dict = {int(i+1):0 for i in range(n)}

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


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

x = x-1
y = y-1

dict = {int(i+1):0 for i in range(n)}

ans = 0
for i in range(n):
    for j in range(n):
        if i < j:
            ans = min(j-i,abs(x-i)+abs(j-y)+1)
            dict[ans] +=1
            
for i in range(n-1):
     print(dict[i+1])
Buggy code:
from collections import Counter
N, X, Y = map(int, input().split())
ans = []

for i in range(N):
    for j in range(i+1, N):
        ans.append(min(j-i, 1+abs(i-x)+abs(j-Y)))

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


Fixed code:
from collections import Counter
N, X, Y = map(int, input().split())
X, Y = X-1, Y-1
ans = []

for i in range(N):
    for j in range(i+1, N):
        ans.append(min(j-i, 1+abs(i-X)+abs(j-Y)))

c = Counter(ans)
for i in range(1,N):
    print(c[i])
Buggy code:
N,X,Y = map(int,input().split())
A = [0]*(N-1)
mi = 0
for i in range(1,N+1):
  for j in range(1,N+1):
    if i < j :
      mi = min(j-i,(abs(X-i)+abs(Y-j)+1))
      A[mi-1] += 1
      print(mi)
for i in range(N-1):
  print(A[i])

Fixed code:
N,X,Y = map(int,input().split())
A = [0]*(N-1)
mi = 0
for i in range(1,N+1):
  for j in range(1,N+1):
    if i < j :
      mi = min(j-i,(abs(X-i)+abs(Y-j)+1))
      A[mi-1] += 1
for i in range(N-1):
  print(A[i])
Buggy code:
n,x,y = map(int,input().split())
a = [0 for i in range(1,n)]
l=y-x;m= max(x-1+l//2,x+n-y)
x-=1;y-=1
for i in range(n):
  for j in range(i+1,n):
    if i+1==j:
      a[0]+=1
    else:
      k = j-i
      if i<=x and j>=y:
      	k=k-l+1
      elif i>=x and j<=y:
        k=min(k,(l+1)-k)
      elif i<=x:
        k=x-i+min((j-x),(l+1)-(j-x))
      else:
        k = j-y+min(y-i,(l+1)-(y-i))  

      a[k-1]+=1
for i in a:
  print(a)

Fixed code:
n,x,y = map(int,input().split())
a = [0 for i in range(1,n)]
l=y-x;m= max(x-1+l//2,x+n-y)
x-=1;y-=1
for i in range(n):
  for j in range(i+1,n):
    if i+1==j:
      a[0]+=1
    else:
      k = j-i
      if i<=x and j>=y:
      	k=k-l+1
      elif i>=x and j<=y:
        k=min(k,(l+1)-k)
      elif i<=x:
        k=x-i+min((j-x),(l+1)-(j-x))
      else:
        k = j-y+min(y-i,(l+1)-(y-i))  

      a[k-1]+=1
for i in a:
  print(i)
Buggy code:
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min([abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)

Fixed code:
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min(abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)
Buggy code:
N, X, Y = map(int, input().split())

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

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

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

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

for i in range(1,N):
    print(distances[i])
Buggy code:
N, X, Y = list(map(int,input().split()))

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


Fixed code:
N, X, Y = list(map(int,input().split()))
 
Num = [0] * N
for j in range(1, N + 1):
  for i in range(1, j):
    D = min(j - i, abs(j - Y) + 1 + abs(i - X))
    Num[D] += 1
for k in range(1, N):
  print(Num[k])
Buggy code:
import collections 
N,X,Y = map(int,input().split())
d = [[0]*(N+1) for _ in range(N+1)]
for i in range(1,N):#i => j
    for j in range(i+1,N+1):
        if(i>=Y or j<=X):
            d[i][j] = j-i
        elif(i<=X and j>=Y):
            d[i][j] = (X-i)+1+(j-Y)
        else:
            a_path = j-i
            b_path = abs(X-i)+1+abs(Y-j)
            d[i][j] = min(a_path,b_path)

ans = [0]
for i in range(N+1):
    ans += d[i]
c = Counter(ans)
for k in range(1,N): 
    print(c[k])

Fixed code:
import collections 
N,X,Y = map(int,input().split())
d = [[0]*(N+1) for _ in range(N+1)]
for i in range(1,N):#i => j
    for j in range(i+1,N+1):
        if(i>=Y or j<=X):
            d[i][j] = j-i
        elif(i<=X and j>=Y):
            d[i][j] = (X-i)+1+(j-Y)
        else:
            a_path = j-i
            b_path = abs(X-i)+1+abs(Y-j)
            d[i][j] = min(a_path,b_path)

ans = [0]
for i in range(N+1):
    ans += d[i]
c = collections.Counter(ans)
for k in range(1,N): 
    print(c[k])
Buggy code:
n, x, y = map(int, input().split())
li = [0]*(n-1)
print(li)
for i in range(1, n+1):
    for j in range(i+1, n+1):
        num = min(j-i, abs(i-x)+abs(j-y)+1)
        li[num-1] += 1
for i in li:
    print(i)

Fixed code:
n, x, y = map(int, input().split())
li = [0]*(n-1)
# print(li)
for i in range(1, n+1):
    for j in range(i+1, n+1):
        num = min(j-i, abs(i-x)+abs(j-y)+1)
        li[num-1] += 1
for i in li:
    print(i)
Buggy code:
array = list(map(int, input().split()))
miniDis = []
for i in range(1,array[0]):
  for j in range(i+1,array[0]+1):
    miniDis.append(min(j-i,abs(array[1]-i)+1+abs(array[2]-j)))
                     
for i in range(1,array[0]-1):
  print(miniDis.count(i))


Fixed code:
array = list(map(int, input().split()))
miniDis = [0]*(array[0] -1)
for i in range(1,array[0]):
  for j in range(i+1,array[0]+1):
    miniDis[min(j-i,abs(array[1]-i)+1+abs(array[2]-j))-1] += 1
    
                   
                   
                   
                   
for i in range(array[0] -1):
  print(miniDis[i])
Buggy code:
N, X, Y = map(int, input().split())


dic = {}

X = X - 1
Y = Y - 1

for i in range(N):
    for j in range(i + 1, N):
        if i <= X and Y <= j:
            v = X - i + 1 + j - Y
        elif (i <= X) and (X <= j and j <= Y):
            v = min(j - i, X - i + 1 + Y - j)
        elif (X <= i and i <= Y) and Y <= j:
            v = min(j - i, i - X + 1 + j - Y)
        elif (X <= i and i <= Y) and (X <= j and j <= Y):
            v = min(j - i, i - X + 1 + Y - j)
        else:
            v = j - i

        if v in dic:
            dic[v] += 1
        else:
            dic[v] = 1


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


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


dic = {}

X = X - 1
Y = Y - 1

for i in range(N):
    for j in range(i + 1, N):
        if i <= X and Y <= j:
            v = X - i + 1 + j - Y
        elif (i <= X) and (X <= j and j <= Y):
            v = min(j - i, X - i + 1 + Y - j)
        elif (X <= i and i <= Y) and Y <= j:
            v = min(j - i, i - X + 1 + j - Y)
        elif (X <= i and i <= Y) and (X <= j and j <= Y):
            v = min(j - i, i - X + 1 + Y - j)
        else:
            v = j - i

        if v in dic:
            dic[v] += 1
        else:
            dic[v] = 1


for i in range(1, N):
    if i in dic:
        print(dic[i])
    else:
        print(0)
Buggy code:
[n,x,y]=list(map(int,input().split()))
anslist=[0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        if i<=x-1 and y-1<=j:
            kyori=j-y+x-i+1
        else:
            kyori=j-i
        anslist[kyori-1]+=1
for i in range(len(anslist)):
    print(anslist[i])



Fixed code:
[n,x,y]=list(map(int,input().split()))
anslist=[0]*(n-1)
x-=1
y-=1
for i in range(n-1):
    for j in range(i+1,n):
        if j<=x or y<=i:
            kyori=j-i
        elif i<=x<=j<=y:
            kyori=min(j-i,x-i+1+y-j)
        elif x<=i<=y<=j:
            kyori=min(j-i,i-x+1+j-y)
        elif i<=x and y<=j:
            kyori=x-i+1+j-y
        elif x<=i and j<=y:
            kyori=min(j-i,i-x+1+y-j)
        else:kyori=1
        anslist[kyori-1]+=1
for i in range(len(anslist)):
    print(anslist[i])
Buggy code:
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):
        d = min(
            j - i,
            abs(i - X) + (Y - X - 1) + abs(j - Y),
            abs(j - X) + (Y - X - 1) + abs(i - Y)
        )
        ans[d] += 1

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


Fixed code:
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):
        d = min(
            j - i,
            abs(i - X) + 1 + abs(j - Y),
            abs(j - X) + 1 + abs(i - Y)
        )
        ans[d] += 1

print(*ans[1:], sep='\n')
Buggy code:
from itertools import combinations

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

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

for i in range(1, n):
    print(cnt)


Fixed code:
from itertools import combinations

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

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

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