Buggy python submission (verdict: Time Limit Exceeded):
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] = ans.get(c, 0) + 1

for i in range(1, N):
    print(ans.get(i, 0))


Fixed submission:
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

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

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


def inpl():
    return list(map(int, input().split()))


class Graph:
    def __init__(self):
        self.edge = {}
        self.cost = {}
        self.vertex = set()
        return

    def addEdgeCost(self, i, j, c, directed=False):
        self.vertex.add(i)
        self.vertex.add(j)

        if i not in self.edge:
            self.edge[i] = []
        self.edge[i].append(j)
        self.cost[(i, j)] = c

        if directed is False:
            return

        if j not in self.edge:
            self.edge[j] = []
        self.edge[j].append(i)
        self.cost[(j, i)] = c
        return


def dijkstra(g: Graph, s=None) -> dict:
    def solve(v_start):
        ret_cost = {v: float("inf") for v in g.vertex}
        ret_cost[v_start] = 0
        heap = [(0, v_start)]

        while heap:
            _, v_from = heapq.heappop(heap)
            for v_to in g.edge.get(v_from, []):
                nc = ret_cost[v_from] + g.cost[(v_from, v_to)]
                if ret_cost[v_to] > nc:
                    ret_cost[v_to] = nc
                    heapq.heappush(heap, (nc, v_to))
        return ret_cost

    if s is None:
        V = g.vertex
    else:
        V = [s]

    ret = {}
    for v in V:
        ret[v] = solve(v)
    return ret


N, X, Y = inpl()

G = Graph()
for i in range(N - 1):
    G.addEdgeCost(i, i + 1, 1, directed=True)
G.addEdgeCost(X - 1, Y - 1, 1, directed=True)

ans_dict = {}
for g in dijkstra(G).values():
    for v in g.values():
        ans_dict[v] = ans_dict.get(v, 0) + 1

for i in range(1, N):
    print(ans_dict.get(i, 0) // 2)


Fixed submission:
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

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

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


def inpl():
    return list(map(int, input().split()))


class Graph:
    def __init__(self):
        self.edge = {}
        self.cost = {}
        self.vertex = set()
        return

    def addEdgeCost(self, i, j, c, directed=False):
        self.vertex.add(i)
        self.vertex.add(j)

        if i not in self.edge:
            self.edge[i] = []
        self.edge[i].append(j)
        self.cost[(i, j)] = c

        if directed is False:
            return

        if j not in self.edge:
            self.edge[j] = []
        self.edge[j].append(i)
        self.cost[(j, i)] = c
        return


def dijkstra(g: Graph, s=None) -> dict:
    def solve(v_start):
        ret_cost = {v: float("inf") for v in g.vertex}
        ret_cost[v_start] = 0
        heap = [(0, v_start)]

        while heap:
            _, v_from = heapq.heappop(heap)
            for v_to in g.edge.get(v_from, []):
                nc = ret_cost[v_from] + g.cost[(v_from, v_to)]
                if ret_cost[v_to] > nc:
                    ret_cost[v_to] = nc
                    heapq.heappush(heap, (nc, v_to))
        return ret_cost

    if s is None:
        V = g.vertex
    else:
        V = [s]

    ret = {}
    for v in V:
        ret[v] = solve(v)
    return ret


N, X, Y = inpl()

G = Graph()
for i in range(N - 1):
    G.addEdgeCost(i, i + 1, 1, directed=True)
G.addEdgeCost(X - 1, Y - 1, 1, directed=True)

ans_dict = {}
for g in dijkstra(G).values():
    for v in g.values():
        ans_dict[v] = ans_dict.get(v, 0) + 1

for i in range(1, N):
    print(ans_dict.get(i, 0) // 2)


Fixed submission:
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

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

Buggy python submission (verdict: Runtime Error):
from scipy.sparse.csgraph import csgraph_from_dense, dijkstra


def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()

edge = [[-1 for n in range(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

G = csgraph_from_dense(edge, null_value=-1)
ans_dict = {}
for g in dijkstra(G):
    for i in g:
        ans_dict[i] = ans_dict.get(i, 0) + 1

for i in range(1, N):
    print(ans_dict.get(i, 0) // 2)


Fixed submission:
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

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

Buggy python submission (verdict: Time Limit Exceeded):
from scipy.sparse.csgraph import csgraph_from_dense, dijkstra


def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()

edge = [[-1 for n in range(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

G = csgraph_from_dense(edge, null_value=-1)
ans_dict = {}
for g in dijkstra(G):
    for i in g:
        ans_dict[i] = ans_dict.get(i, 0) + 1

for i in range(1, N):
    print(ans_dict.get(i, 0) // 2)


Fixed submission:
def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

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