Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

N = int(input())
L = list(map(int,input().split()))
ans = 0

for i in range(N):
    for j in range(N):
        for k in range(N):
            if i != j and i != k and j != k:
                if (L[i] < (L[j] + L[k])) and (L[j] < (L[k] + L[i])) and (L[k] < (L[i] + L[j])):
                    ans += 1
                    #print(L[i],L[j],L[k])

print(ans//6)

### FIXED CODE ###

# ３重ループではTLE
# a < b < c & c < a + b

import bisect
N = int(input())
L = sorted(list(map(int,input().split())))
ans = 0

for i in range(N):
    for j in range(i+1,N):
        t = L[i] + L[j]
        idx = bisect.bisect_left(L,t)
        ans += max(0, idx-j-1) # c < a + b の範囲を総取り
print(ans)
### BUGGY CODE ###

import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

R, C, K = MI()
item = {(0,0):0}

for i in range(K):
    r_, c_, v_, = MI()
    item[(r_ - 1,c_ - 1)] = v_

dp = [[[0 for _ in range(4)] for _ in range(C + 2)] for _ in range(R + 2)]

for i in range(R + 1):
    for j in range(C + 1):
        for k in range(4):
            if (i,j) in item:
                v = item[(i,j)]
            else:
                v = 0

            if k == 3:
                dp[i + 1][j][0] = max(dp[i][j][k], dp[i + 1][j][0])
                continue
            dp[i + 1][j][0] = max(dp[i][j][k], dp[i][j][k] + v, dp[i + 1][j][0])
            dp[i][j + 1][k] = max(dp[i][j][k], dp[i][j + 1][k])
            dp[i][j + 1][k + 1] = max(dp[i][j][k] + v, dp[i][j + 1][k + 1])

ans = max(dp[R][C][0], dp[R][C][1], dp[R][C][2], dp[R][C][3])
print(ans)

### FIXED CODE ###

import sys
import math
from collections import defaultdict
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


def main():
    R, C, K = NMI()
    item = [[0] * (C + 1) for i in range(R + 1)]

    for i in range(K):
        r_, c_, v_, = NMI()
        item[r_ - 1][c_ - 1] = v_

    dp = [[[0 for _ in range(C + 2)] for _ in range(R + 2)] for _ in range(4)]

    for i in range(R + 1):
        for j in range(C + 1):
            for k in range(4):
                a = dp[k][i][j]
                v = item[i][j]

                if k == 3:
                    dp[0][i + 1][j] = max(a, dp[0][i + 1][j])
                    continue
                dp[0][i + 1][j] = max(a, a + v, dp[0][i + 1][j])
                dp[k][i][j + 1] = max(a, dp[k][i][j + 1])
                dp[k + 1][i][j + 1] = max(a + v, dp[k + 1][i][j + 1])

    print(max(dp[0][R][C], dp[1][R][C], dp[2][R][C], dp[3][R][C]))

if __name__ == "__main__":
    main()
### BUGGY CODE ###

s=input()
r=set()
last=0
power=0
d={0:0}
total=0
for i in range(len(s)-1,-1,-1):
    n=int(s[i])*(pow(10,power))+last
    power+=1
    last=n%2019
    rem=n%2019
    if rem in r:
        d[rem]+=1
        total+=d[rem]-1
    else:
        r.add(rem)
        d[rem]=1
if d[0]==1:
    print(total+1)
else:
    print(total)







### FIXED CODE ###

s=input()
r=set()
last=0
power=1
d={0:0}
total=0
rem=0
for i in range(len(s)-1,-1,-1):#handling of 0's as n and rem
    n=int(s[i])*power+rem
    power*=10
    power=power%2019
    rem=n%2019
    if rem in d.keys():
        d[rem]+=1
    else:
        d[rem]=1
    total+=d[rem]-1
print(total+d[0])
### BUGGY CODE ###

n = int(input())
a = [ int(x) for x in input().split() ]

for i in range(n-1):
    print(a.count(i+1))

print(0)


### FIXED CODE ###

n = int(input())
a = [ int(x) for x in input().split() ]
ans = [0] * n

for i in range(n-1):
    ans[a[i]] += 1

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

print(0)
### BUGGY CODE ###

import math
N = int(input())
a = list(map(int, input().split()))
number = 0
sign = True
while sign:
  for x in a:
    if x % 2 != 0:
      sign = False
      print(number)
      break
    else:
      pass
    number += 1
    
    

  

### FIXED CODE ###

import math
N = int(input())
a = list(map(int, input().split()))
number = 0
sign = True
while sign:
  for i in range(N):
    if a[i] % 2 != 0:
      sign = False
      print(number)
      break
    else:
      a[i] /= 2
  number += 1
### BUGGY CODE ###

# -*- coding: utf-8 -*-

R10 = range(10)
R13 = range(13)

S = input()
R = [[(M * 10 + N) % 13 for N in R10] for M in R13]

MOD =[1]+[0]*12


for i,D in enumerate(S):
    NMOD = [0] * 13
    C = -1
    if D == '?':
        for N in R10:
            for M in R13:
                NM = R[M][N]
                NMOD[NM] += MOD[M]
            #end for
        #end for
    else:
        C = int(D)
        for M in R13:
            NM = R[M][C]
            NMOD[NM] += MOD[M]
        #end for
    #end if
    MOD = [NMOD[M]%1000000007 for M in R13]
#end for

print(MOD[5])


### FIXED CODE ###

# -*- coding: utf-8 -*-

R10 = range(10)
R13 = range(13)

S = input()
R = [[(M-N)*4 % 13 for N in R10] for M in R13]
AM = 10**9+7

MOD =[1]+[0]*12

for D in S:
    if D == '?':
        MOD = [sum([MOD[N] for N in M])%AM for M in R]
    else:
        C = int(D)
        MOD = [MOD[M[C]] for M in R]
    #end if
#end for

print(MOD[5])
### BUGGY CODE ###

N, M = (int(x) for x in input().split())
import numpy as np
from scipy.sparse.csgraph import dijkstra
friends = np.array([[0]*N for _ in range(N)])
for _ in range(M):
    a, b = (int(x) for x in input().split())
    friends[a-1, b-1] = 1
friends = dijkstra(friends,directed=False, unweighted=True)
ans = max(sum(x == 1 for x in friends[i,:]) for i in range(N))+1
print(ans)

### FIXED CODE ###

N, M = (int(x) for x in input().split())
import collections
Parent = [i for i in range(N)]
def fp(i):
    global Parent
    if Parent[i] == i:
        return i
    else:
        Parent[i] = fp(Parent[i])
        return Parent[i]

for _ in range(M):
    a, b = (int(x) for x in input().split())
    par_a, par_b = fp(a-1), fp(b-1)
    if par_a < par_b:
        Parent[par_b] = par_a
    else:
        Parent[par_a] = par_b

Groupsize = collections.defaultdict(lambda:0)
for i in range(N):
    i = fp(i)
    Groupsize[i] +=1
ans = max(gs for gs in Groupsize.values())
print(ans)
### BUGGY CODE ###

from heapq import heappop, heappush


def p_d():
    n, m = map(int, input().split())
    ab = [tuple(map(int, input().split())) for _ in range(n)]
    ab = sorted(ab)
    ans = 0

    for i in range(1, m + 1):
        H = []
        for j, e in enumerate(ab):
            if e[0] <= i:
                heappush(H, (-e[1], j))
            else:
                break

        if H:
            e = heappop(H)
            ans -= e[0]
            ab.pop(e[1])

    print(ans)


if __name__ == '__main__':
    p_d()


### FIXED CODE ###

from heapq import heappop, heappush


def p_d():
    n, m = map(int, input().split())
    ab = [tuple(map(int, input().split())) for _ in range(n)]

    ab.sort()
    ans = 0
    j = 0
    H = []

    for i in range(1, m + 1):
        while j < n and ab[j][0] <= i:
            heappush(H, -ab[j][1])
            j += 1

        if H:
            ans -= heappop(H)

    print(ans)


if __name__ == '__main__':
    p_d()
### BUGGY CODE ###

import collections
import sys
n,k = map(int,input().split())
ls = list(map(int,input().split()))
a = list(set(ls))
c = collections.Counter(ls)
p = 0
if len(a) > k:
    for i in range(len(a)-1):
        if len(a) - k - i > 0:
            p += c.most_common()[-1-i][1]
        else:
            print(p)
            sys.exit()
else:
    print(0)

### FIXED CODE ###

import sys
n,k = map(int,input().split())
ls = list(map(int,input().split()))
p = len(list(set(ls)))
if p <= k:
    print(0)
    sys.exit()
di=[float("inf")]*n
for i in range(n):
    if di[ls[i]-1] == float("inf"):
        di[ls[i]-1] = 1
    else:
        di[ls[i]-1] += 1
di.sort(reverse=True)
q = 0 
while True:
    s = di.pop()
    p -= 1
    q += s
    if p <= k:
        print(q)
        sys.exit()
### BUGGY CODE ###

n,m=map(int,input().split())
A=[int(input()) for i in range(m)]
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in A:dp[i]=0
print(dp[n])


### FIXED CODE ###

n,m=map(int,input().split())
A=set(int(input()) for i in range(m))
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in A:dp[i]=0
print(dp[n])
### BUGGY CODE ###

from itertools import combinations, combinations_with_replacement
from math import sqrt


n = int(input())
ans = [0] * (n + 1)
for x, y, z in combinations_with_replacement(range(1, int(sqrt(n)) + n // 10), 3):
    i = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    if i <= n:
        if x == y == z:
            ans[i] += 1
        elif all([not(s != t) for s, t in combinations([x, y, z], 2)]):
            ans[i] += 6
        else:
            ans[i] += 3

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


### FIXED CODE ###

from itertools import combinations, combinations_with_replacement
from math import sqrt


n = int(input())
ans = [0] * (n + 1)
for x, y, z in combinations_with_replacement(range(1, int(sqrt(n))), 3):
    i = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    if i <= n:
        if x == y == z:
            ans[i] += 1
        elif all([(s != t) for s, t in combinations([x, y, z], 2)]):
            ans[i] += 6
        else:
            ans[i] += 3

for i in range(1, n + 1):
    print(ans[i])
### BUGGY CODE ###

def main():
    import heapq
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    h = [(-j,i) for i,j in enumerate(b)]
    h2 = []
    heapq.heapify(h)
    cnt = 0
    while h:
        i, j = heapq.heappop(h)
        i=-i
        temp2=b[j-1]+b[(j+1)%n]
        sho=(i-a[j])//temp2
        if  sho==0:
            h2.append((i, j))
            continue
        cnt += sho
        b[j] -= temp2*sho
        heapq.heappush(h, (-b[j], j))
    h2.sort(key=lambda x: x[1])
    for i in range(n):
        if a[i] != h2[i][0]:
            print(-1)
            return 0
    print(cnt)


main()

### FIXED CODE ###

def main():
    from heapq import heappop as hpop
    from heapq import heappush as hpush
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    h = []
    for i in range(n):
        hpush(h, (-b[i], i))
    cnt = 0
    while h:
        i, j = hpop(h)
        i = -i
        jj = (j+1) % n
        temp = i-a[j]
        temp2 = b[j-1]+b[jj]
        sho = temp//temp2
        if sho == 0:
            if temp:
                print(-1)
                return 0
            continue
        cnt += sho
        b[j] -= temp2*sho
        hpush(h, (-b[j], j))
    print(cnt)
main()
### BUGGY CODE ###

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = [[]]
for i in range(N):
    A.append(LIST()[::-1])

cnt = N*(N-1)//2
nxtli = list(range(1, N+1))
day = 0
while cnt > 0:
    prev = cnt
    skip = [False] * (N+1)
    # 前回変更があった場所のみでループを回す
    curli = nxtli[:]
    nxtli = []
    for i in curli:
        if len(A[i]) and not skip[i]:
            a = A[i][-1]
            if len(A[a]) and not skip[a]:
                b = A[a][-1]
                if i == b:
                    A[i].pop()
                    A[a].pop()
                    # 変更があった場所をリストに入れておく
                    nxtli += [i, a]
                    cnt -= 1
                    skip[i] = skip[a] = True
    if prev == cnt:
        print(-1)
        exit()
    day += 1
print(day)


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys
import time
from collections import deque

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = [deque()]
for i in range(N):
    A.append(deque(LIST()))

start = time.time()

cnt = N*(N-1)//2
day = 0
while cnt > 0:
    prev = cnt
    skip = [False] * (N+1)
    for i in range(1, N+1):
        if len(A[i]) and not skip[i]:
            a = A[i][0]
            if len(A[a]) and not skip[a]:
                b = A[a][0]
                if i == b:
                    A[i].popleft()
                    A[a].popleft()
                    cnt -= 1
                    skip[i] = skip[a] = True
    if prev == cnt:
        print(-1)
        exit()
    day += 1

    elapsed_time = time.time() - start
    if elapsed_time > 1:
        print(N*(N-1)//2)
        exit()
print(day)
### BUGGY CODE ###

s = input()
q = int(input())
r = False
for _ in range(q):
  cmd = input()
  if cmd[0] == '1':
    r = not r
  else:
    t,f,c = cmd.split()
    if (f == '1' and not r) or (f == '2' and r):
      s = c + s
    else:
      s = s + c
if r:
	print(s[::-1])
else:
	print(s)


### FIXED CODE ###

from collections import deque
s = input()

q = int(input())
s = deque(s)
r = False
for _ in range(q):
    cmd = input()
    if cmd[0] == '1':
        r = not r
    else:
        cmd, f, c = cmd.split()
        if (f == '2' and not r) or (f=='1' and r):
            s.append(c)
        else:
            s.appendleft(c)
if r:
    s.reverse()
print(''.join(s))
### BUGGY CODE ###

N = int(input())
S = input()

ans = N

for i in range(N):
    X = S[:i]
    Y = S[i+1:]
    res = 0
    
    num = X.count("W") + Y.count("E")
    
    ans = min(ans, num)
    
print(ans)

### FIXED CODE ###

N = int(input())
S = input()

X = ""
Y = S[1:]

leader = S[0]
num_x = 0
num_y = Y.count("E")

num = num_y

for i in range(1, N):
    
    X_new = leader
    
    if X_new == "W":
        num_x += 1
    
    leader = S[i]
    
    if leader == "E": 
        num_y -= 1
    
    num = min(num, num_x+num_y)
    
print(num)
### BUGGY CODE ###

import numpy as np
from itertools import product

H,W,K = map(int, input().split())
S = np.array(([list(map(int,list(input()))) for _ in range(H)])).T

if np.sum(S)<=K:
    print(0)
else:
    answer = (H-1) * (W-1)
    for X in product([False,True], repeat=H-1):
        ans = np.sum(X)
        if ans >= answer:
            continue
        M = [[0]]
        for i, x in enumerate(X):
            if x:
                M.append([])
            M[-1].append(i+1)
        D = np.zeros(len(M))
        for s in S:
            D[:] += np.array([sum(s[i] for i in m) for m in M])
            if any(d > K  for d in D):
                ans += 1
                if ans >= answer:
                    break
                D[:] = np.array([sum(s[i] for i in m) for m in M])

        if answer > ans:
            answer = ans
        elif answer==1:
            break

    print(min(answer,ans))

### FIXED CODE ###


def main():
    from itertools import product
    import numpy as np

    H,W,K = map(int, input().split())
    S = (np.array([list(map(int,list(input()))) for _ in range(H)]).T).tolist()

    if sum(sum(s) for s in S)<=K:
        print(0)
    else:
        answer = (H-1) * (W-1)
        for X in product([False,True], repeat=H-1):
            ans = np.sum(X)
            if ans >= answer:
                continue
            M = [[0]]
            for i, x in enumerate(X):
                if x:
                    M.append([])
                M[-1].append(i+1)
            D = [0]*len(M)
            for s in S:
                for k, m in enumerate(M):
                    D[k] += sum(s[i] for i in m)
                if any(d > K  for d in D):
                    ans += 1
                    if ans >= answer:
                        break
                    for k, m in enumerate(M):
                        D[k] = sum(s[i] for i in m)
                    
                    if any(d > K for d in D):
                        ans = answer + 1
                        break

            answer = min(answer,ans)

        print(answer)

main()
### BUGGY CODE ###

import itertools
N = int(input())
S = input()
C = list(itertools.combinations_with_replacement(range(1, N + 1), 3))
count = 0
for i, j, k in C:
    if (i != 2 * j - k) and (S[i - 1] != S[j - 1] and S[i - 1] != S[k - 1] and S[j - 1] != S[k - 1]):
        count += 1
print(count)


### FIXED CODE ###

N = int(input())
S = input()
count = S.count("R") * S.count("G") * S.count("B")


for j in range(N):
    for i in range(j):
        k = 2 * j - i
        if k >= N:
            continue
        if (S[i] != S[j]) and (S[i] != S[k]) and (S[j] != S[k]):
            count -= 1
print(count)
### BUGGY CODE ###

n=int(input())
S=input()

ans=0
import itertools
itr=itertools.product(list("1234567890"),repeat=3)

for it in itr:
    cnt=0
    for i in range(n):
        if S[i]==it[cnt]:
            cnt+=1
        if cnt==3:
            ans+=1
            break

print(ans)

### FIXED CODE ###

n=int(input())
S=input()

ans=0
import itertools
itr=itertools.product(list("1234567890"),repeat=3)

for it in itr:
    cnt=0
    for i in range(n):
        if S[i]==it[cnt]:
            cnt+=1
        if cnt==3:
            ans+=1
            break

print(ans)
### BUGGY CODE ###

import sys

input = sys.stdin.readline

N = int(input())

Graph = [[] for _ in range(N)]
edges = []

for _ in range(N - 1):
  a, b = [int(x) - 1 for x in input().split()]
  edges.append((a, b))
  
for a, b in edges:
  Graph[a].append(b)
  Graph[b].append(a)
  
k = max(len(edges) for edges in Graph)

colors = {color for color in range(1, k + 1)}
usedcolor_sets = [set() for _ in range(N)]
colored = {}

for v in range(N):
  unused_colors = colors - usedcolor_sets[v]  
  for edge in Graph[v]:
    # 未着色
    if (v, edge) not in colored and (edge, v) not in colored:
      color = unused_colors.pop()
      colored[(v, edge)] = colored[(edge, v)] = color
      usedcolor_sets[edge].add(color)

print(k)

for a, b in edges:
  print(colored[(a, b)])
  

### FIXED CODE ###

import sys

input = sys.stdin.readline

N = int(input())

Graph = [[] for _ in range(N)]
edges = []

for _ in range(N - 1):
  a, b = [int(x) - 1 for x in input().split()]
  edges.append((a, b))
  
for a, b in edges:
  Graph[a].append(b)
  Graph[b].append(a)
  
k = max(len(edges) for edges in Graph)

colors = [color for color in range(1, k + 1)]
usedcolor = [None for _ in range(N)]
colored = {}

def colors_except(x):
  for c in colors:
    if c == x:
      continue
    yield c

for v in range(N):
  unused_colors = colors_except(usedcolor[v])
  for edge in Graph[v]:
    # 未着色
    if (v, edge) not in colored and (edge, v) not in colored:
      color = next(unused_colors)
      colored[(v, edge)] = colored[(edge, v)] = color
      usedcolor[edge] = color

print(k)

for a, b in edges:
  print(colored[(a, b)])
### BUGGY CODE ###

import numpy as np
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
c = Counter(A)

tmp = []
for n in c:
    tmp.append(c[n])
tmp = np.array(tmp)
l1= tmp*(tmp-1)//2
l2= (tmp-1)*((tmp-1)-1)//2

for a in A:
    r = list(c).index(a)
    sum = np.sum(l1) + l2[r] -l1[r]
    print(int(sum))


### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))

import collections 
c=collections.Counter(A)
sum=0
for i in c:
  sum+=c[i]*(c[i]-1)//2  
for a in A:
  print(sum - c[a]*(c[a]-1)//2 + (c[a]-1)*(c[a]-2)//2)
### BUGGY CODE ###

n=int(input())
s=input()
ans=0
for i in range(1000):
  t_str=str(i)
  t_len=len(t_str)
  t_str=(3-t_len)*"0"+t_str
  cur_idx=0
  ok=0
  for j,ss in enumerate(s):
    if ss==t_str[cur_idx]:
      cur_idx+=1
      ok+=1
    if cur_idx==3:break
  if cur_idx==3:
    ans+=1
print(ans) 



### FIXED CODE ###

n=int(input())
s=input()
ans=0
for i in range(1000):
  t_str=str(i)
  t_len=len(t_str)
  t_str=(3-t_len)*"0"+t_str
  cur_idx=0
  ok=0
  for j,ss in enumerate(s):
    if ss==t_str[cur_idx]:
      cur_idx+=1
      ok+=1
    if cur_idx==3:break
  if cur_idx==3:
    ans+=1
print(ans)
### BUGGY CODE ###

N = int(input())
l = []
c = []
for i in range(N):
  s = input()
  try:
    index = l.index(s)
    c[index] += 1
  except:
    l.append(s)
    c.append(1)
m = max(c)
n = []
for i in range(len(c)):
  if c[i] == m:
    n.append(l[i])

n.sort()
for g in n:
  print(g)
    
  

### FIXED CODE ###

n = int(input())
d = {}
for _ in range(n) :
    s = input()
    if s in d :
        d[s] += 1
    else :
        d[s] = 1

mx = max(d.values())
for s in sorted(k for k in d if d[k] == mx) :
    print(s)
### BUGGY CODE ###

import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

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

for i in range(n-1):
    graph[i][i+1] = 1
    graph[i+1][i] = 1
    
graph[x-1][y-1] = 1
graph[y-1][x-1] = 1

ans = shortest_path(np.array(graph))

for i in range(1,n):
    print(int(np.count_nonzero(ans == i)/2))

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

from numpy.linalg import solve

n = int(input())
a = [int(x) for x in input().split()]

#left = [[1] * 3 for i in range(3)]
left = []
for i in range(n-1):
    temp = [0] * n
    temp[i] = 1
    temp[i+1] = 1
    left.append(temp)
else:
    temp = [0] * n
    temp[0] = 1
    temp[-1] = 1
    left.append(temp)

#print(left)

right = [x * 2 for x in a]
#print(right)

sol = [int(x) for x in solve(left, right)]
print(' '.join(map(str, sol)))
    

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]

c = 0
for i in range(n):
    c += a[i] * (-2 * (i%2) + 1)

sol = [c]

for i in range(1,n):
    c = c * (-1) + 2 * a[i-1]
    sol.append(c)
    
print(' '.join(map(str, sol)))
### BUGGY CODE ###

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

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

for i in range(n-1):
    print(sub_degree[i])


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

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