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

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


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

cnt = [0] * n

dist = []
for i in range(n):
    dist.append([-1] * n)
for i in range(n):
    dist[i][x] = abs(i-x)
    dist[i][y] = abs(i-y)
    dist[x][i] = abs(i-x)
    dist[y][i] = abs(i-y)

for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dis = min(j - i, dist[j][y] + 1 + dist[i][x], dist[j][x] + 1 + dist[i][y])
        cnt[dis] += 1
for i in range(1, n):
    print(cnt[i])

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

dist = []
for i in range(n):
    dist.append([110110] * n)

def dijkstra(s):
    h = []
    heapq.heappush(h, (0, s))
    dist[s][s] = 0
    while len(h) != 0:
        pair = heapq.heappop(h)
        now = pair[1]
        dis = pair[0]
        if dis < dist[s][now]:
            continue

        if now != 0:
            if dist[s][now] + 1 < dist[s][now-1]:
                dist[s][now-1] = dist[s][now] + 1
                heapq.heappush(h, (dist[s][now-1], now-1))
        if now != n-1:
            if dist[s][now] + 1 < dist[s][now+1]:
                dist[s][now+1] = dist[s][now] + 1
                heapq.heappush(h, (dist[s][now+1], now+1))
        if now == x:
            if dist[s][now] + 1 < dist[s][y]:
                dist[s][y] = dist[s][now] + 1
                heapq.heappush(h, (dist[s][y], y))
        if now == y:
            if dist[s][now] + 1 < dist[s][x]:
                dist[s][x] = dist[s][now] + 1
                heapq.heappush(h, (dist[s][x], x))

cnt = [0] * n

for i in range(n):
    dijkstra(i)
for i in range(n):
    for j in range(n):
        cnt[dist[i][j]] += 1
for i in range(1, n):
    print(cnt[i] // 2)


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

cnt = [0] * n

dist = []
for i in range(n):
    dist.append([-1] * n)
for i in range(n):
    dist[i][x] = abs(i-x)
    dist[i][y] = abs(i-y)
    dist[x][i] = abs(i-x)
    dist[y][i] = abs(i-y)

for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dis = min(j - i, dist[j][y] + 1 + dist[i][x], dist[j][x] + 1 + dist[i][y])
        cnt[dis] += 1
for i in range(1, n):
    print(cnt[i])

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10000)
n, x, y = list(map(int, input().split()))
x -= 1
y -= 1

dist = []
for i in range(n):
    dist.append([110110] * n)

def dfs(now, s):
    if now != 0:
        if dist[s][now] + 1 < dist[s][now-1]:
            dist[s][now-1] = dist[s][now] + 1
            dfs(now-1, s)
    if now != n-1:
        if dist[s][now] + 1 < dist[s][now+1]:
            dist[s][now+1] = dist[s][now] + 1
            dfs(now+1, s)
    if now == x:
        if dist[s][now] + 1 < dist[s][y]:
            dist[s][y] = dist[s][now] + 1
            dfs(y, s)
    if now == y:
        if dist[s][now] + 1 < dist[s][x]:
            dist[s][x] = dist[s][now] + 1
            dfs(x, s)

cnt = [0] * n

for i in range(n):
    dist[i][i] = 0
    dfs(i, i)

for i in range(n):
    for j in range(n):
        cnt[dist[i][j]] += 1

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


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

cnt = [0] * n

dist = []
for i in range(n):
    dist.append([-1] * n)
for i in range(n):
    dist[i][x] = abs(i-x)
    dist[i][y] = abs(i-y)
    dist[x][i] = abs(i-x)
    dist[y][i] = abs(i-y)

for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dis = min(j - i, dist[j][y] + 1 + dist[i][x], dist[j][x] + 1 + dist[i][y])
        cnt[dis] += 1
for i in range(1, n):
    print(cnt[i])

Buggy python submission (verdict: Runtime Error):
n, x, y = list(map(int, input().split()))
x -= 1
y -= 1

dist = []
for i in range(n):
    dist.append([110110] * n)

def dfs(now, s):
    if now != 0:
        if dist[s][now] + 1 < dist[s][now-1]:
            dist[s][now-1] = dist[s][now] + 1
            dfs(now-1, s)
    if now != n-1:
        if dist[s][now] + 1 < dist[s][now+1]:
            dist[s][now+1] = dist[s][now] + 1
            dfs(now+1, s)
    if now == x:
        if dist[s][now] + 1 < dist[s][y]:
            dist[s][y] = dist[s][now] + 1
            dfs(y, s)
    if now == y:
        if dist[s][now] + 1 < dist[s][x]:
            dist[s][x] = dist[s][now] + 1
            dfs(x, s)

cnt = [0] * n

for i in range(n):
    dist[i][i] = 0
    dfs(i, i)

for i in range(n):
    for j in range(n):
        cnt[dist[i][j]] += 1
        
for i in range(1, n):
    print(cnt[i] // 2)


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

cnt = [0] * n

dist = []
for i in range(n):
    dist.append([-1] * n)
for i in range(n):
    dist[i][x] = abs(i-x)
    dist[i][y] = abs(i-y)
    dist[x][i] = abs(i-x)
    dist[y][i] = abs(i-y)

for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dis = min(j - i, dist[j][y] + 1 + dist[i][x], dist[j][x] + 1 + dist[i][y])
        cnt[dis] += 1
for i in range(1, n):
    print(cnt[i])