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

def make_divisors(n):
    cnt=0
 
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            cnt+=1
            if i != n // i:
                cnt+=1
    
    return cnt
 
n=int(input())
ans=0
t=[0] 
for i in range(1, n+1):
    d=make_divisors(i)
    t.append(d)

for i in range(1, n+1):
    ans+=t[i]*i

print(ans)

### FIXED CODE ###

n=int(input())

ans=0

for i in range(1, n+1):
    begin=i
    end=(n//i)*i
    cnt=(n//i)
    ans+=(1/2)*cnt*(begin+end)

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

n = int(input())

a, b = map(int,input().split())

for i in range(n-1):
    s,t = map(int,input().split())
    while float(a/b) != float(s/t):
        if float(a/b) > float(s/t):
            b += 1
        elif float(a/b) < float(s/t):
            a += 1

print(a+b)

### FIXED CODE ###

from math import ceil

n = int(input())
a = 1
b = 1

for i in range(n):
    s,t = map(int,input().split())
    #x = max([ceil(a/s), ceil(b/t)])
    x = max((a+s-1)//s, (b+t-1)//t)

    a = x*s
    b = x*t

print(a+b)
### BUGGY CODE ###

n=int(input())
P=list(map(int,input().split()))
ans=0

for i in range(n):
    M=min(P[0:i+1])
    if M==P[i]:
        ans+=1
print(ans)

### FIXED CODE ###

n=int(input())
P=list(map(int,input().split()))
ans=0
M=P[0]
for i in range(n):
    if M>=P[i]:
        ans+=1
        M=P[i]
print(ans)
### BUGGY CODE ###

X, Y = map(int, input().split())
i = 1
if X % Y == 0:
    print(-1)
else:
    while True:
        if i % X == 0 and i % Y != 0:
            print(i)
            break
        else:
            i += 1


### FIXED CODE ###

X, Y = map(int, input().split())
i = 1
if X % Y == 0:
    print(-1)
else:
    print(X)
### BUGGY CODE ###

a, b, k = map(int, input().split())
for i in range(a, b+1):
    if i-a+1 <= k or b-i+1 <= k:
        print(i)

### FIXED CODE ###

a, b, k = map(int, input().split())
if b-a+1 < 2*k:
    for i in range(a, b+1):
        print(i)
else:
    for i in range(a, a+k):
        print(i)
    for i in range(b-k+1, b+1):
        print(i)
### BUGGY CODE ###

from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
N = int(input())
G = [[-1]*N for i in range(N)]


def get_path(start, goal, pred):
    return get_path_row(start, goal, pred[start])


def get_path_row(start, goal, pred_row):
    path = []
    i = goal
    while i != start and i >= 0:
        path.append(i)
        i = pred_row[i]
    if i < 0:
        return []
    path.append(i)
    return path[::-1]


ans = 2**(N-1)
for i in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    G[a][b] = 1
    G[b][a] = 1
G = csgraph_from_dense(G, null_value=-1)
g, p = floyd_warshall(G, return_predecessors=True)
ans = 0
# print(g)
M = int(input())
s = [set() for i in range(M)]
for i in range(M):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    gp = get_path(u, v, p)
    for j in range(len(gp)-1):
        s[i].add((min(gp[j], gp[j+1]), max(gp[j], gp[j+1])))

for i in range(2**M):
    tmp = set()
    c = 0
    for j in range(M):
        if (i >> j) % 2 == 1:
            tmp |= s[j]
            c += 1

    ans += ((-1)**c)*(2**(N-1 - len(tmp)))


print(ans)


### FIXED CODE ###

import collections
from itertools import combinations
N = int(input())
ab = [tuple(map(int, input().split())) for i in range(N-1)]
M = int(input())
uv = [tuple(map(int, input().split())) for i in range(M)]


def popcount(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


G = [[-1]*N for i in range(N)]
for i in range(N-1):
    a, b = ab[i]
    a -= 1
    b -= 1
    G[a][b] = i
    G[b][a] = i

q = collections.deque()

G2 = [[0 for j in range(N)] for i in range(N)]

for i in range(N):
    q.append((i, 0))
    reached = [False]*N
    reached[i] = True
    while(q):
        x, s = q.popleft()
        for y in range(N):
            if G[x][y] == -1 or reached[y]:
                continue
            else:
                G2[i][y] = s | (1 << G[x][y])
                q.append((y, s | 1 << G[x][y]))
                reached[y] = True


ans = 2**(N-1)
ans2 = 0
for i in range(1, 2**M):
    tmp = 2**(N-1) - 1
    for j in range(M):
        if (i >> j) % 2 == 1:
            u, v = uv[j]
            u -= 1
            v -= 1
            tmp &= ~G2[u][v]
    ans2 += ((-1)**(popcount(i)-1)) * (1 << popcount(tmp))
    # print(ans2, i)
print(ans-ans2)
### BUGGY CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
sum = 0

for i in range(m):
  b, c = map(int, input().split())
  for j in range(b):
    a.append(c)

a.sort()
for i in a[len(a)-n:len(a)]:
  sum += i

print(sum)


### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
s = []

for i in range(n):
  s.append((a[i], 1))

for _ in range(m):
  b, c = map(int, input().split())
  s.append((c, b))
#  for j in range(b):
#    a.append(c)

s.sort(reverse=True)
idx = 0
sum = 0
for i in range(n):
  if idx + s[i][1] > n:
    sum += s[i][0] * (n-idx)
    break

  sum += s[i][0] * s[i][1]
  idx += s[i][1]


# for i in range(l-n, l):
#  sum += a[i]

print(sum)
### BUGGY CODE ###

s = int(input())
def f(k):
  if k % 2 ==0:
    return k//2
  else:
    return 3*k+1

ary1 = [None]*1000001
ary1[1] = s

for i in range(2,1000001):
  fn = f(ary1[i-1])
  if fn in ary1:
    print(i)
    break
  else:
    ary1[i] = fn

### FIXED CODE ###

s = int(input())
def f(k):
  if k % 2 ==0:
    return k//2
  else:
    return 3*k+1

ary1 = [None]*1000001
ary1[1] = s

for i in range(2,1000001):
  fn = f(ary1[i-1])
  if fn in ary1:
    print(i)
    break
  else:
    ary1[i] = fn
### BUGGY CODE ###

s = input()
t = input()

dp = [[0] * (len(t) + 1) for _ in range(len(s) + 1)]
for i in range(len(s)):
    for j in range(len(t)):
        if s[i] == t[j]:
            dpp = dp[i][j] + 1
            dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dpp)
        dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j + 1])
        dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i + 1][j])

u = ''
i = len(s)
j = len(t)
while i > 0 and j > 0:
    if dp[i][j] == dp[i - 1][j]:
        i -= 1
    elif dp[i][j] == dp[i][j - 1]:
        j -= 1
    else:
        u = s[i - 1] + u
        i -= 1
        j -= 1

print(u)

### FIXED CODE ###

s = input()
t = input()

dp = [[0] * (len(t) + 1) for _ in range(len(s) + 1)]
for i in range(len(s)):
    for j in range(len(t)):
        if s[i] == t[j]:
            dpp = dp[i][j] + 1
            dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dpp)
        dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j + 1])
        dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i + 1][j])

u = ''
i = len(s)
j = len(t)
while i > 0 and j > 0:
    if dp[i][j] == dp[i - 1][j]:
        i -= 1
    elif dp[i][j] == dp[i][j - 1]:
        j -= 1
    else:
        u = s[i - 1] + u
        i -= 1
        j -= 1

print(u)
### BUGGY CODE ###

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

b = []
for num in a:
  b += [str(num)]
  b = b[::-1]

print(" ".join(b))  

### FIXED CODE ###

from collections import deque

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

b = deque()
if n%2 == 0:
  for i in range(n):
    if i%2 == 0:
      b.append(a[i])
    else:
      b.appendleft(a[i])
else:
  for i in range(n):
    if i%2 == 1:
      b.append(a[i])
    else:
      b.appendleft(a[i])
    
b = list(b)    

for i in range(n):
  print(b[i], end=" ")
### BUGGY CODE ###

n, s = map(int, input().split())
x = [abs(i-s) for i in map(int, input().split())]
for i in range(min(x), -1, -1):
    if all(j%i==0 for j in x):
        print(i)
        exit()

### FIXED CODE ###

from fractions import *
from math import *
from functools import reduce

def gcds(*xs):
    return reduce(gcd, xs)

n, s = map(int, input().split())
x = [abs(i-s) for i in map(int, input().split())]
print(gcds(*x))
### BUGGY CODE ###

K,S=map(int,input().split())
sum=0
count=0
for i in range(K+1):
    sum+=i
    a=sum
    L=S-sum
    #print(L)
    LL=min(L,K)
    for j in range(LL+1):
        sum+=j
        if sum==S: #X＝Sの場合
            count+=1
            #print(str(i)+" "+str(j))
            break
        if S-sum>=0 and S-sum<=K :
            count+=1
            #print(str(i)+" "+str(j))
        sum=a #jを足す前に戻す
    sum=0
print(count)            

### FIXED CODE ###

K,S=map(int,input().split())
count=0
for x in range(K+1):
    for y in range(min(K+1,S-x+1)):
        z=S-x-y
        if 0<=z<=K:
            count+=1
print(count)
### BUGGY CODE ###

import sys
import bisect

input = sys.stdin.readline

N, Q = map(int, input().split())

STX_array = [list(map(int, input().split())) for _ in range(N)]

STX_array = sorted(STX_array, key=lambda x: x[2])

Q_array = [int(input()) for _ in range(Q)]

index_array = [i for i in range(Q)]

ans_array = [-1] * Q
for STX in STX_array:
    s, t, x = STX
    index_left = bisect.bisect_left(Q_array, s - 0.5 - x)
    index_right = bisect.bisect_left(Q_array, t - 0.5 - x)
    if index_left != index_right:
        for i in index_array[index_left:index_right]:
            ans_array[i] = x

        del Q_array[index_left:index_right]
        del index_array[index_left:index_right]
    if len(Q_array) == 0:
        break
for ans in ans_array:
    print(ans)

### FIXED CODE ###

import sys
import bisect

input = sys.stdin.readline

N, Q = map(int, input().split())

STX_array = [list(map(int, input().split())) for _ in range(N)]

STX_array = sorted(STX_array, key=lambda x: x[2])

Q_array = [int(input()) for _ in range(Q)]

index_array = [i for i in range(Q)]

ans_array = [-1] * Q
for STX in STX_array:
    s, t, x = STX
    index_left = bisect.bisect_left(Q_array, s - 0.5 - x)
    index_right = bisect.bisect_left(Q_array, t - 0.5 - x)
    if index_left != index_right:
        now_index = index_left
        while now_index < index_right:
            if index_array[now_index] == now_index:
                ans_array[now_index] = x
                index_array[now_index] = index_right
                now_index += 1
            else:
                old_index = now_index
                now_index = index_array[now_index]
                index_array[old_index] = now_index




for ans in ans_array:
    print(ans)
### BUGGY CODE ###

from collections import deque

N=int(input())
a=[[] for v in range(N+1)]
d=[[-1 for v in range(N+1)] for u in range(N+1)]
for e in range(1,N):
    u,v,w=map(int,input().split())
    a[u].append(v);a[v].append(u)
    d[u][v]=d[v][u]=w

#c=[None for v in range(N+1)] # color
d1=[None for v in range(N+1)] # distance from 1

# print(a)
# print(d)

q=deque()
q.append(1);d1[1]=0
while q:
    u=q.popleft()
    for v in a[u]:
        if d1[v] is None:
            d1[v]=d1[u]+d[u][v]
            q.append(v)

# print(d1)
for d1i in d1[1:]:
    print(d1i%2)

### FIXED CODE ###

from collections import deque

N=int(input())
a=[set() for v in range(N)] # 0-initial
for e in range(1,N):
    u,v,w=map(int,input().split())
    a[u-1].add((v-1,w))
    a[v-1].add((u-1,w))

d=[-1 for v in range(N)] # distance from 0

q=deque()
q.append(0);d[0]=0
while q:
    u=q.popleft()
    for v,w in a[u]:
        if d[v]==-1:
            d[v]=d[u]+w
            q.append(v)

for di in d:
    print(di%2)
### BUGGY CODE ###

N,K = map(int, input().split())
S = str(input())

## 連続するものをlistとして保持する
import re

def nchars(s,n):
    reg = re.compile("(.)\\1{%d,}" % (n-1))
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s =s[m.end():]
        
candidates = list(nchars(S,1))
## いい具合にnumpyで操作
import numpy as np
count_0 = np.zeros((len(candidates)))
count_1 = np.zeros((len(candidates)))

for i,candidate in enumerate(candidates):
  if int(candidate[0]) == 0:
    count_0[i] += len(candidate)
  else:
    count_1[i] += len(candidate)
    
## 最小の試行回数
min_Try = len(np.where(count_0 != 0)[0])

change_ = np.where(count_0 != 0)[0]
## 最小の試行回数以下の時どうするかが厳しいな...
## 連続しないので、とりあえず大きい順に入れていけばオッケー
## 個数分だけ全部足して、indexで見たときに一番大きいやつが正解！！
if min_Try <= K :
  print(N)
else:
  count_ = count_0 + count_1
  del count_0,count_1
  #print(count_)
  change_list = []
  for k in range(min_Try-K+1):
    c__ = change_[k:k+K]
    s = max(0,c__[0]-1)
    e = min(len(candidates)-1,c__[-1]+1)
    #print(count_[s:e+1])
    change_list.append(np.sum(count_[s:e+1]))
  print(int(max(change_list)))

### FIXED CODE ###

N, K = list(map(int, input().split()))
S = input()

S = S + 'E'   # 終端処理
ans = -1    # 答えの初期値（十分に小さい値）

# 立った人の連続の数
if (S[0] == '0'):
    stand = 1
else:
    stand = 0

L = 0
R = 0

# 尺取り法
while (R < N):
    # 右端を進めることが可能（立った人の連続の数がK以下）なら、右端を進める
    if (stand <= K):
        # 立った人の連続の数が増えるなら1足す
        if (S[R] == '1' and S[R + 1] == '0'):
            stand += 1
        # 答えの更新
        ans = max(ans, R - L + 1)
        R += 1
    # 進められない場合、左端と右端が同じなら両者を進める
    # 左端が右端を追い越さないための処理
    elif (L == R):
        L += 1
        R += 1
    # それ以外は左端のみを進める
    else:
        # 立った人の連続の数が減るなら1減らす
        if (S[L] == '0' and S[L + 1] == '1'):
            stand -= 1
        L += 1
        # 左端のみを進めた場合は答えを更新し得ない

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

import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    N,Q=map(int,input().split())
    M = N-1  # 頂点数，辺数
    ans=[0]*N
    # グラフ入力受取 (ここでは無向グラフを想定)
    G = [[] for _ in range(N)]
    for i in range(M):
        a, b = map(int, input().split())
        a-=1
        b-=1
        G[a].append(b)
        G[b].append(a)
    
    for i in range(Q):
        p,x=map(int,input().split())
        p-=1
        ans[p]+=x

        
    
    seen = [False]*N
    
    
    def dfs(G, v):    
        seen[v] = True
    
        for next_v in G[v]:
            if seen[next_v]:
                continue
            ans[next_v]+=ans[v]
            dfs(G, next_v)
    
    
    # 頂点 0 をスタートとした探索
    dfs(G, 0)
    print(*ans)
    
    
    
resolve()

### FIXED CODE ###

from collections import Counter, deque, OrderedDict
# from copy import copy, deepcopy
# from functools import reduce
# from heapq import heapify, heappop, heappush
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import statistics # Pythonのみ
# import string
import unittest
from io import StringIO
import sys
sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():

    N, Q = map(int, input().split())
    M = N-1  # 頂点数，辺数
    ans = [0]*N

    # グラフ入力受取 (ここでは無向グラフを想定)
    G = [[] for _ in range(N)]
    for i in range(M):
        a, b = map(int, input().split())
        a -= 1
        b -= 1
        G[a].append(b)
        G[b].append(a)

    for i in range(Q):
        p, x = map(int, input().split())
        p -= 1
        ans[p] += x

    seen = [False]*N

    def dfs(G, v):
        seen[v] = True
        stack = deque([v])
        while stack:
            v = stack.pop()
            for next_v in G[v]:
                if seen[next_v]:
                    continue
                seen[next_v] = True
                ans[next_v] += ans[v]
                stack.append(next_v)

    # 頂点 0 をスタートとした探索
    dfs(G, 0)
    print(*ans)


resolve()
### BUGGY CODE ###

#import numpy as np

def getNearestValue(list, num):
    last=0

    for i in list:
        if i < num:
            last = i
        else:
            if last==0: 
                return i

            if num - last > i - num:
                return i
            else:
                return last

    return last

    # idx = np.searchsorted(list, num, side="left")
    # if idx > 0 and (idx == len(list) or abs(num - list[idx-1]) < abs(num - list[idx])):
    #     return list[idx-1]
    # else:
    #     return list[idx]

    # idx = np.abs(np.asarray(list) - num).argmin()
    # return list[idx]

def main():
    A, B, Q = map(int, input().split())  #複数数値入力
    S = [0] * A
    T = [0] * B
    X = [0] * Q
    for i in range(A):
        S[i] = int(input())
    for i in range(B):
        T[i] = int(input())
    for i in range(Q):
        X[i] = int(input())

    for i in range(Q):
        # 1:神社先
        basyo1 = getNearestValue(S, X[i])   
        dist1 = abs(basyo1 - X[i])
        dist1 += abs(getNearestValue(T, basyo1) -basyo1)

        # 2:寺先
        basyo2 = getNearestValue(T, X[i])
        dist2 = abs(basyo2 - X[i])
        dist2 += abs(getNearestValue(S, basyo2) -basyo2)

        print(min(dist1, dist2))


main()

### FIXED CODE ###

import bisect

A, B, Q = map(int, input().split())  # 複数数値入力
S = [0] * A
T = [0] * B
X = [0] * Q
for i in range(A):
    S[i] = int(input())
for i in range(B):
    T[i] = int(input())
for i in range(Q):
    X[i] = int(input())

S.insert(0, -float("inf"))
S.append(float("inf"))
T.insert(0, -float("inf"))
T.append(float("inf"))

for i in range(Q):
    b = bisect.bisect_right(S, X[i])
    d = bisect.bisect_right(T, X[i])
    res = float("inf")
    for s in [S[b - 1], S[b]]:
        for t in [T[d - 1], T[d]]:
            d1 = abs(s - X[i]) + abs(t - s)  # 先に神社
            d2 = abs(t - X[i]) + abs(t - s)  # 先に寺
            res = min(res, d1, d2)

    print(res)
### BUGGY CODE ###

import sys

def exhaustiveSearch(A, m):
    if len(A) == 1 and A[0] != m:
        return False
    elif A[0] == m:
        return True
    return exhaustiveSearch(A[1:], m) or exhaustiveSearch(A[1:], m - A[0])

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    A = map(int, lines[1].split())
    M = map(int, lines[3].split())

    for m in M:
        if exhaustiveSearch(A, m):
            print "yes"
        else:
            print "no"

### FIXED CODE ###

import sys

def exhaustiveSearch(A, m, i, s):
    if A[i] == m:
        return True
    elif i == len(A) - 1 or m < 0 or m > s:
        return False

    return exhaustiveSearch(A, m, i + 1, s) or exhaustiveSearch(A, m - A[i], i + 1, s)

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    A = map(int, lines[1].split())
    M = map(int, lines[3].split())
    s = sum(A)

    for m in M:
        if exhaustiveSearch(A, m, 0, s):
            print "yes"
        else:
            print "no"
### BUGGY CODE ###

H, W = map(int, input().split())
sh, sw = map(int, input().split())
gh, gw = map(int, input().split())

sh += 1
sw += 1
gh += 1
gw += 1

S = [0]*(H+4)
S[0] = '*'*(W+4)
S[1] = '*'*(W+4)
S[-2] = '*'*(W+4)
S[-1] = '*'*(W+4)
for h in range(2,H+2):
  S[h] = '**' + input() + '**'

visited = [[float('inf')]*(W+4) for _ in range(H+4)]
dh1 = [0,1,0,-1]
dw1 = [1,0,-1,0]
dh2 = [2,2,2,2,2,1,1,1,1,0,0,-1,-1,-1,-1,-2,-2,-2,-2,-2]
dw2 = [-2,-1,0,1,2,-2,-1,1,2,-2,2,-2,-1,1,2,-2,-1,0,1,2]

from collections import deque
d = deque()

d.append((sh,sw,0))

while len(d)>0:
  h,w,cnt = d.popleft()
  if visited[h][w]<=cnt:
    continue
  visited[h][w] = cnt
  for i in range(4):
    h1 = h+dh1[i]
    w1 = w+dw1[i]
    if S[h1][w1]=='.':
      if visited[h1][w1]>cnt:
        d.append((h1,w1,cnt))
  for i in range(20):
    h2 = h+dh2[i]
    w2 = w+dw2[i]
    if S[h2][w2]=='.':
      if visited[h2][w2]>cnt+1:
        d.append((h2,w2,cnt+1))
ans = visited[gh][gw] if visited[gh][gw]<float('inf') else -1
print(ans)

### FIXED CODE ###

H, W = map(int, input().split())
sh, sw = map(int, input().split())
gh, gw = map(int, input().split())

sh += 1
sw += 1
gh += 1
gw += 1
s = sh*(W+4)+sw
g = gh*(W+4)+gw
S = [0]*(H+4)
S[0] = '*'*(W+4)
S[1] = '*'*(W+4)
S[-2] = '*'*(W+4)
S[-1] = '*'*(W+4)
for h in range(2,H+2):
  S[h] = '**' + input() + '**'

visited = [10**7]*((W+4)*(H+4))
dh1 = [0,1,0,-1]
dw1 = [1,0,-1,0]
dh2 = [2,2,2,2,2,1,1,1,1,0,0,-1,-1,-1,-1,-2,-2,-2,-2,-2]
dw2 = [-2,-1,0,1,2,-2,-1,1,2,-2,2,-2,-1,1,2,-2,-1,0,1,2]

from collections import deque

d = deque()
visited[s] = 0
d.append(s)
ans = 10**8
while len(d)>0:
  a = d.popleft()
  h,w = divmod(a,W+4)
  cnt = visited[a]
  if ans<=cnt:
    continue
  for i in range(4):
    h1 = h+dh1[i]
    w1 = w+dw1[i]
    a1 = h1*(W+4)+w1
    if (h1,w1)==(gh,gw):
      ans = min(ans,cnt)
    if S[h1][w1]=='.':
      if visited[a1]>cnt:
        visited[a1]=cnt
        d.appendleft(a1)
  for i in range(20):
    h2 = h+dh2[i]
    w2 = w+dw2[i]
    a2 = h2*(W+4)+w2
    if (h2,w2)==(gh,gw):
      ans = min(ans,cnt+1)
    if S[h2][w2]=='.':
      if visited[a2]>cnt+1:
        visited[a2]=cnt+1
        d.append(a2)
if ans==10**8:
  ans = -1
print(ans)
### BUGGY CODE ###

S=input()
N=len(S)
MOD=10**9+7

dp=[[0]*13 for _ in range(N+1)]
dp[0][0]=1
for i in range(1,N+1):
    c=S[i-1]
    if c=='?':
        for k in range(10):
            for n in range(13):
                nn=(n*10+k)%13
                dp[i][nn]+=dp[i-1][n]
                dp[i][nn]%=MOD
    else:
        for n in range(13):
            nn=(n*10+int(c))%13
            dp[i][nn]+=dp[i-1][n]
            dp[i][nn]%=MOD
print(dp[N][5])

### FIXED CODE ###

S=input()
N=len(S)
MOD=10**9+7

dp=[[0]*13 for _ in range(N+1)]
dp[0][0]=1
for i in range(1,N+1):
    c=S[i-1]
    if c=='?':
        for k in range(10):
            for n in range(13):
                nn=(n*10+k)%13
                dp[i][nn]+=dp[i-1][n]
                dp[i][nn]%=MOD
    else:
        for n in range(13):
            nn=(n*10+int(c))%13
            dp[i][nn]+=dp[i-1][n]
            dp[i][nn]%=MOD
print(dp[N][5])
### BUGGY CODE ###

# coding: utf-8
import numpy as np


if __name__ == "__main__":
	n, w = map(int, input().split())
	ws, vs = [], []
	for _ in range(n):
		w_, v_ = map(int, input().split())
		ws.append(w_)
		vs.append(v_)

	def rec(i, j, memo = [[-1 for _ in range(w+1)] for _ in range(n+1)]):


		if memo[i][j] != -1:
			return memo[i][j]

		result = 0
		if i == n:
			result = 0

		elif j < ws[i]:
			result = rec(i+1, j)

		else:
			result = max(
				rec(i+1, j),
				rec(i+1, j-ws[i]) + vs[i]
				)

		memo[i][j] = result

		#print(np.array(memo))
		#print('--------------------------')

		return memo[i][j]

	print(rec(0, w))


### FIXED CODE ###

# coding: utf-8

if __name__ == "__main__":
	n, w = map(int, input().split())
	vs, ws = [], []

	for i in range(n):
		w_, v_ = map(int, input().split())
		ws.append(w_)
		vs.append(v_)

	nap_memo = {}
	def nap(i, j):
		key = str(i)+':'+str(j)

		if key in nap_memo:
			return nap_memo[key]

		r = 0
		if i == n:
			r = 0
		elif j < ws[i]:
			r = nap(i+1, j)
		else:
			r = max(nap(i+1, j),
					nap(i+1, j-ws[i]) + vs[i])

		nap_memo[key] = r
		return r

	print(nap(0, w))
### BUGGY CODE ###

N, X, Y = map(int, input().split())
for k in range(1,N):
    d = 0
    for i in range(1,N+1):
        for j in range(i+1,N+1):
            if k==min(j-i, abs(X-i)+1+abs(j-Y), abs(Y-i)+1+abs(j-X)):
                d+=1
    print(d)

### FIXED CODE ###

N, X, Y = map(int, input().split())
a = [0]*N
for i in range(1,N+1):
    for j in range(i+1,N+1):
        a[min(j-i, abs(i-X)+1+abs(j-Y))-1]+= 1
for i in range(N-1):
    print(a[i])