Buggy python submission (verdict: Time Limit Exceeded):
import sys
from collections import deque

def main():
    # n, x, y = 7, 3, 7
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    score = {i: 0 for i in range(1, n)}
    total_pair = set()

    def bfs(start):
        seen = set()
        q = deque()
        q.append((0, start))
        while q:
            dist, cur = q.popleft()
            pair = (min(start, cur), max(start, cur))
            if pair in seen:
                continue
            seen.add(pair)
            if dist > 0:
                if pair not in total_pair:
                    score[dist] += 1
                    total_pair.add(pair)
            if cur < n-1:
                q.append((dist+1, cur+1))
            if cur > 0:
                q.append((dist+1, cur-1))
            if cur == x-1:
                q.append((dist+1, y-1))
            if cur == y-1:
                q.append((dist+1, x-1))

    for i in range(n-1):
        bfs(i)
    for i in range(1, n):
        print(score[i])

main()


Fixed submission:
import sys

def main():
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    x1 = x-1
    y1 = y-1

    score = {i:0 for i in range(n)}

    for i in range(n-1):
        for j in range(i+1, n):
            diff = j - i
            cand = abs(x1 - i) + 1 + abs(y1 - j)
            cand2 = abs(y1 - i) + 1 + abs(x1 - j)
            result = min(diff, cand, cand2)
            score[result] += 1

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

main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from heapq import heappush, heappop
 
 
def main():
    # n, x, y = 7, 3, 7
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    score = {i: 0 for i in range(1, n)}
    total_pair = set()
 
    def bfs(start):
        seen = set()
        heap = [(0, start)]
        while heap:
            dist, cur = heappop(heap)
            pair = (min(start, cur), max(start, cur))
            if pair in seen:
                continue
            seen.add(pair)
            if dist > 0:
                if pair not in total_pair:
                    score[dist] += 1
                    total_pair.add(pair)
 
            if cur < n-1:
                heappush(heap, (dist+1, cur+1))
            if cur > 0:
                heappush(heap, (dist+1, cur-1))
            if cur == x-1:
                heappush(heap, (dist+1, y-1))
            if cur == y-1:
                heappush(heap, (dist+1, x-1))
 
    for i in range(n-1):
        bfs(i)
    for i in range(1, n):
        print(score[i])
 
main()

Fixed submission:
import sys

def main():
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    x1 = x-1
    y1 = y-1

    score = {i:0 for i in range(n)}

    for i in range(n-1):
        for j in range(i+1, n):
            diff = j - i
            cand = abs(x1 - i) + 1 + abs(y1 - j)
            cand2 = abs(y1 - i) + 1 + abs(x1 - j)
            result = min(diff, cand, cand2)
            score[result] += 1

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

main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from heapq import heappush, heappop


def main():
    # n, x, y = 7, 3, 7
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    score = {i: 0 for i in range(1, n)}
    total_pair = set()

    def bfs(start):
        seen = set()
        heap = [(0, start)]
        while heap:
            dist, cur = heappop(heap)
            pair = (min(start, cur), max(start, cur))
            if pair in seen:
                continue
            seen.add(pair)
            if dist > 0:
                if pair not in total_pair:
                    score[dist] += 1
                    total_pair.add(pair)

            if cur < n-1:
                heappush(heap, (dist+1, cur+1))
            if cur > 0:
                heappush(heap, (dist+1, cur-1))
            if cur == x-1:
                heappush(heap, (dist+1, y-1))
            if cur == y-1:
                heappush(heap, (dist+1, x-1))

    for i in range(n-1):
        bfs(i)
    for i in range(1, n):
        print(score[i])

main()


Fixed submission:
import sys

def main():
    n, x, y = [int(s) for s in sys.stdin.readline().strip().split()]
    x1 = x-1
    y1 = y-1

    score = {i:0 for i in range(n)}

    for i in range(n-1):
        for j in range(i+1, n):
            diff = j - i
            cand = abs(x1 - i) + 1 + abs(y1 - j)
            cand2 = abs(y1 - i) + 1 + abs(x1 - j)
            result = min(diff, cand, cand2)
            score[result] += 1

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

main()