Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
x -= 1 ; y -= 1

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  n,x,y = map(int,input().split())
  w = n

  def dijkstra(s,n,w,cost):
      #始点sから各頂点への最短距離
      #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
      d = [float("inf")] * n
      used = [False] * n
      d[s] = 0

      while True:
          v = -1
          #まだ使われてない頂点の中から最小の距離のものを探す
          for i in range(n):
              if (not used[i]) and (v == -1):
                 v = i
              elif (not used[i]) and d[i] < d[v]:
                  v = i
          if v == -1:
                 break
          used[v] = True

          for j in range(n):
                 d[j] = min(d[j],d[v]+cost[v][j])
      return d

  ################################

  cost = [[float("inf") for i in range(n)] for i in range(n)] 
  #cost[u][v] : 辺uvのコスト(存在しないときはinf この場合は10**10)
  for i in range(n-1):
      cost[i][i+1] = 1
      cost[i+1][i] = 1

  cost[x-1][y-1] = 1
  cost[y-1][x-1] = 1

  print(n)
  for dis in range(2,n) :
    ans = 0
    for s in range(n) :
      ans += dijkstra(s,n,w,cost).count(dis)
    print(ans//2)

if __name__ == '__main__':
  main()

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  n,x,y = map(int,input().split())
  w = n

  def dijkstra(s,n,w,cost):
      #始点sから各頂点への最短距離
      #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
      d = [float("inf")] * n
      used = [False] * n
      d[s] = 0

      while True:
          v = -1
          #まだ使われてない頂点の中から最小の距離のものを探す
          for i in range(n):
              if (not used[i]) and (v == -1):
                 v = i
              elif (not used[i]) and d[i] < d[v]:
                  v = i
          if v == -1:
                 break
          used[v] = True

          for j in range(n):
                 d[j] = min(d[j],d[v]+cost[v][j])
      return d

  ################################

  cost = [[float("inf") for i in range(n)] for i in range(n)] 
  #cost[u][v] : 辺uvのコスト(存在しないときはinf この場合は10**10)
  for i in range(n-1):
      cost[i][i+1] = 1
      cost[i+1][i] = 1

  cost[x-1][y-1] = 1
  cost[y-1][x-1] = 1

  print(n)
  for dis in range(2,n) :
    ans = 0
    for s in range(n) :
      ans += dijkstra(s,n,w,cost).count(dis)
    print(ans//2)

if __name__ == '__main__':
  main()

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
w = n

def dijkstra(s,n,w,cost):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [float("inf")] * n
    used = [False] * n
    d[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
               v = i
            elif (not used[i]) and d[i] < d[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
               d[j] = min(d[j],d[v]+cost[v][j])
    return d

################################

cost = [[float("inf") for i in range(n)] for i in range(n)] 
#cost[u][v] : 辺uvのコスト(存在しないときはinf この場合は10**10)
for i in range(n-1):
    cost[i][i+1] = 1
    cost[i+1][i] = 1
    
cost[x-1][y-1] = 1
cost[y-1][x-1] = 1

print(n)
for dis in range(2,n) :
  ans = 0
  for s in range(n) :
    ans += dijkstra(s,n,w,cost).count(dis)
  print(ans//2)

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
w = n

def dijkstra(s,n,w,cost):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [float("inf")] * n
    used = [False] * n
    d[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
               v = i
            elif (not used[i]) and d[i] < d[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
               d[j] = min(d[j],d[v]+cost[v][j])
    return d

################################

cost = [[float("inf") for i in range(n)] for i in range(n)] 
#cost[u][v] : 辺uvのコスト(存在しないときはinf この場合は10**10)
for i in range(n-1):
    cost[i][i+1] = 1
    cost[i+1][i] = 1
    
cost[x-1][y-1] = 1
cost[y-1][x-1] = 1

for dis in range(1,n) :
  ans = 0
  for s in range(n) :
    ans += dijkstra(s,n,w,cost).count(dis)
  print(ans//2)

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
w = n

def dijkstra(s,n,w,cost):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [float("inf")] * n
    used = [False] * n
    d[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
               v = i
            elif (not used[i]) and d[i] < d[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
               d[j] = min(d[j],d[v]+cost[v][j])
    return d

################################

cost = [[float("inf") for i in range(n)] for i in range(n)] 
#cost[u][v] : 辺uvのコスト(存在しないときはinf この場合は10**10)
for i in range(n-1):
    cost[i][i+1] = 1
    cost[i+1][i] = 1
    
cost[x-1][y-1] = 1
cost[y-1][x-1] = 1

for dis in range(1,n) :
  ans = 0
  for s in range(n) :
    ans += dijkstra(s,n,w,cost).count(dis)
  print(ans//2)

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

ans = [0 for i in range(n)]
for s in range(n) :
  for g in range(s,n) :
    if s == g :
      continue
    dis = min(abs(g-s),abs(abs(x-s)+1+abs(y-g)),abs(abs(y-s)+1+abs(x-g)))
    ans[dis] += 1
    
for i in range(1,n) :
  print(ans[i])