ZhenlongDai/ACPR huggingface dataset:
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    n,x,y=map(int,input().split())
    dist=[0]*n
    x-=1
    y-=1
    for i in range(n-1):
        for j in range(i+1,n):
            d=j-i
            dist[min(d,abs(x-i)+abs(y-j)+1)-1]+=1
    for i in dist:
        print(i)

if __name__ == '__main__':
    main()

Failing test case input:
11 2 7

Expected output:
11
13
12
8
6
4
1
0
0
0


Actual output:
11
13
12
8
6
4
1
0
0
0
0


Fixed submission (verdict: Accepted):
def main():
    n,x,y=map(int,input().split())
    dist=[0]*(n-1)
    x-=1
    y-=1
    for i in range(n-1):
        for j in range(i+1,n):
            d=j-i
            dist[min(d,abs(x-i)+abs(y-j)+1)-1]+=1

    for i in dist:
        print(i)

if __name__ == '__main__':
    main()

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

distances = [0]*N
for i in range(N):
    for j in range(i+1,N):
        d = min(j-i, (abs(X-i)+1+abs(j-Y)), abs(Y-i)+1+abs(j-X))
        distances[d] += 1

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

Failing test case input:
12 2 6

Expected output:
12
14
11
8
7
6
5
3
0
0
0


Actual output:
12
14
12
10
7
6
4
1
0
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())

X -= 1
Y -= 1
distances = [0]*N
for i in range(N):
    for j in range(i+1,N):
        d = min(abs(j-i), abs(X-i)+1+abs(j-Y), abs(Y-i)+1+abs(j-X))
        distances[d] += 1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

ans = [0] * (N - 1)
ans[0] = 1

for i in range(1, N - 1):
    for j in range(i + 1, N + 1):
        d = min(j - i, abs(Y - j) + abs(X - i) + 1)
        ans[d - 1] += 1

print(ans)


Failing test case input:
25 3 4

Expected output:
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Actual output:
[24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())

ans = [0] * (N - 1)
ans[0] = 1

for i in range(1, N - 1):
    for j in range(i + 1, N + 1):
        d = min(j - i, abs(Y - j) + abs(X - i) + 1)
        ans[d - 1] += 1

for a in ans:
    print(a)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x, y = map(int, input().split())
lis = [0]*(n-1)
print(lis)
for i in range(1, n):
    for j in range(i+1, n+1):
        lis[min([j-i, abs(x-i)+1+abs(y-j), abs(y-i)+1+abs(x-j)])-1] += 1
for i in range(n-1):
    print(lis[i])

Failing test case input:
19 4 8

Expected output:
19
21
19
18
16
13
12
11
10
9
8
7
5
2
1
0
0
0


Actual output:
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
19
21
19
18
16
13
12
11
10
9
8
7
5
2
1
0
0
0


Fixed submission (verdict: Accepted):
n, x, y = map(int, input().split())
lis = [0]*(n-1)
for i in range(1, n):
    for j in range(i+1, n+1):
        lis[min([j-i, abs(x-i)+1+abs(y-j), abs(y-i)+1+abs(x-j)])-1] += 1
for i in range(n-1):
    print(lis[i])
Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y=map(int,input().split())
def dis(i,j):
  return min(j-i,abs(j-y)+abs(i-x)+1)-1
ans=[0]*(n-1)
for i in range(0,n-1):
  for j in range(i,n):
    ans[dis(i,j)]+=1
for i in range(len(ans)):
  print(ans[i])

Failing test case input:
68 1 3

Expected output:
68
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
68
67
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
67


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
def dis(i,j):
  return min(j-i,abs(j-y)+abs(i-x)+1)-1
ans=[0]*(n-1)
for i in range(1,n):
  for j in range(i+1,n+1):
    ans[dis(i,j)]+=1
for i in range(len(ans)):
  print(ans[i])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y=map(int,input().split())
x-=1
y-=1
cnt=[0]*n
for i in range(n):
  for j in range(i+1,n):
    dist=min(j-i,abs(j-x)+1+abs(i-y))
    cnt[dist]+=1
for i in range(1,n):
  print(cnt[i])

Failing test case input:
53 1 3

Expected output:
53
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
x-=1
y-=1
cnt=[0]*n
for i in range(n):
  for j in range(i+1,n):
    dist=min(j-i,abs(j-x)+1+abs(i-y),abs(j-y)+1+abs(i-x))
    cnt[dist]+=1
for i in range(1,n):
  print(cnt[i])

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y = map(int,input().split())
dist = [0]*(n-1)
for i in range(n):
  for j in range(i+1,n):
    dist[min(j-i,abs(i-x)+abs(j-y)+1,abs(i-y)+abs(j-x)+1)-1] += 1
for i in range(n-1):
  print(dist[i])

Failing test case input:
50 1 3

Expected output:
50
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
50
49
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Fixed submission (verdict: Accepted):
n,x,y = map(int,input().split())
dist = [0]*(n-1)
for i in range(1,n):
  for j in range(i+1,n+1):
    dist[min(abs(j-i),abs(i-x)+abs(j-y)+1,abs(i-y)+abs(j-x)+1)-1] += 1
for i in range(n-1):
  print(dist[i])
Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, x, y = map(int, input().split())
li = [0]*(n-1)
print(li)
for i in range(1, n+1):
    for j in range(i+1, n+1):
        num = min(j-i, abs(i-x)+abs(j-y)+1)
        li[num-1] += 1
for i in li:
    print(i)

Failing test case input:
17 3 5

Expected output:
17
16
15
13
12
11
10
9
8
7
6
5
4
2
1
0


Actual output:
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
17
16
15
13
12
11
10
9
8
7
6
5
4
2
1
0


Fixed submission (verdict: Accepted):
n, x, y = map(int, input().split())
li = [0]*(n-1)

for i in range(1, n+1):
    for j in range(i+1, n+1):
        num = min(j-i, abs(i-x)+abs(j-y)+1)
        li[num-1] += 1
for i in li:
    print(i)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())
c = [0 for i in range(N)]
print(c)
for i in range(1,N):
  for j in range(i+1,N+1):
    x = abs(X-i)
    y = abs(Y-j)
    a = min(x+y+1,j-i)
    c[a]+=1

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


Failing test case input:
10 4 6

Expected output:
10
9
8
7
5
3
2
1
0


Actual output:
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
10
9
8
7
5
3
2
1
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())
c = [0 for i in range(N)]
for i in range(1,N):
  for j in range(i+1,N+1):
    x = abs(X-i)
    y = abs(Y-j)
    a = min(x+y+1,j-i)
    c[a]+=1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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):
        
        a = abs(j - i)
        
        b = abs(i - X) + abs(j - Y) + 1
        ans[(min(a, b))] += 1
for i in ans:
    print(i)


Failing test case input:
37 1 7

Expected output:
37
38
39
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
4
2
0
0
0


Actual output:
0
37
38
39
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
4
2
0
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())
ans = [0]*(N-1)
for i in range(1, N+1):
    for j in range(i+1, N+1):
        
        a = abs(j - i)
        
        b = abs(i - X) + abs(j - Y) + 1
        ans[(min(a, b))-1] += 1
for i in ans:
    print(i)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X,Y = map(int,input().split())
length = [0]*(N+1)
for i in range(1,N+1):
  for j in range(i,N+1):
    ans = min(abs(j-i),abs(X-i)+1+abs(Y-j),abs(X-j)+1+abs(Y-i))
    length[ans] += 1
for i in range(1,N+1):
  print(length[i])

Failing test case input:
92 1 3

Expected output:
92
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
92
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0
0


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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int,input().split())
x -= 1
y -= 1
a = [0] * n
for i in range(n-1):
    for j in range(i+1,n):
        m = min(j-i,abs(i-x)+1+abs(j-y))
        a[m] += 1
for i in range(n):
    print(a[i])


Failing test case input:
34 3 5

Expected output:
34
33
32
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
1
0


Actual output:
0
34
33
32
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
1
0


Fixed submission (verdict: Accepted):
n,x,y = map(int,input().split())
x -= 1
y -= 1
a = [0] * n
for i in range(n-1):
    for j in range(i+1,n):
        m = min(j-i,abs(i-x)+1+abs(j-y))
        a[m] += 1
for i in range(1,n):
    print(a[i])

Problem: p02726
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N+1):
    for y in range(x + 1, N+1):
        res.append(min([abs(x-y), 1 + abs(X-x) + abs(Y-y), 1 + abs(Y-x) + abs(X-x)]))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)

Failing test case input:
50 1 4

Expected output:
50
49
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Actual output:
50
49
47
218
41
79
38
73
35
67
32
61
29
55
26
49
23
43
20
37
17
31
14
25
11
19
8
13
5
7
2
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min(abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)
Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y= map(int, input().split())

ans=[0]*n

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

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

Failing test case input:
10 1 8

Expected output:
10
11
12
8
3
1
0
0
0


Actual output:
10
11
12
8
3
1
0
0
0
0


Fixed submission (verdict: Accepted):
n,x,y= map(int, input().split())

ans=[0]*(n-1)

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

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

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y=map(int,input().split())
x-=1
y-=1
d=[[0]*n for i in range(n)]
for i in range(n):
    for j in range(i+1,n):
        d[i][j]=min(j-i,abs(x-i)+abs(y-j)+1)
        


ans=[0]*(n+1)
for i in range(n):
    for j in range(n):
        ans[d[i][j]]+=1
for i in range(1,n+1):
    print(ans[i])

Failing test case input:
9 2 4

Expected output:
9
8
6
5
4
3
1
0


Actual output:
9
8
6
5
4
3
1
0
0


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
x-=1
y-=1
d=[[0]*n for i in range(n)]
for i in range(n):
    for j in range(i+1,n):
        d[i][j]=min(j-i,abs(x-i)+abs(y-j)+1)
        


ans=[0]*(n+1)
for i in range(n):
    for j in range(n):
        ans[d[i][j]]+=1
for i in range(1,n):
    print(ans[i])

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y = map(int,input().split())

u = []
for i in range(1,n):
    for j in range(i+1,n+1):
        u.append(min(j-i,abs(x-i)+abs(y-j)+1))

import collections
u2 = collections.Counter(u)
u2 = list(u2.items())
for k in range(n):
    u2.append((0,0))

for i in range(n):
    if u2[i][0] == i+1:
        print(u2[i][1])
    else:
        print(0)

Failing test case input:
16 2 5

Expected output:
16
16
14
12
11
10
9
8
7
6
5
4
2
0
0


Actual output:
16
16
14
12
11
10
9
8
7
6
5
4
2
0
0
0


Fixed submission (verdict: Accepted):
n,x,y = map(int,input().split())

u = []
for i in range(1,n):
    for j in range(i+1,n+1):
        u.append(min(j-i,abs(x-i)+abs(y-j)+1))

import collections
u2 = collections.Counter(u)
u2 = list(u2.items())
for k in range(n):
    u2.append((0,0))

for i in range(n-1):
    if u2[i][0] == i+1:
        print(u2[i][1])
    else:
        print(0)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

lists = [0] * (N - 1)

for i in range(N - 1):
  for j in range(i + 1, N):
    min_length = min(abs(j-i),abs(X-i)+1+abs(j-Y),abs(Y-i)+1+abs(j-X))
    lists[min_length - 1] += 1

for k in lists:
  print(k)
        

Failing test case input:
8 1 6

Expected output:
8
9
7
3
1
0
0


Actual output:
8
10
8
2
0
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())

lists = [0] * (N - 1)

for i in range(1, N):
  for j in range(i + 1, N + 1):
    min_length = min(abs(j-i),abs(X-i)+1+abs(j-Y),abs(Y-i)+1+abs(j-X))
    lists[min_length - 1] += 1

for k in lists:
  print(k)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x, y = map(int,input().split())

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

for i, value in enumerate(ans_list):
    print(value)

Failing test case input:
25 1 4

Expected output:
25
24
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Actual output:
0
25
24
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Fixed submission (verdict: Accepted):
n, x, y = map(int,input().split())

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

for i in range(1, len(ans_list)):
    print(ans_list[i])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x, y = [int(i) for i in input().split()]

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

print(*ans[1:], sep='\n')

Failing test case input:
10 4 8

Expected output:
10
12
10
8
4
1
0
0
0

Actual output:
10
12
9
6
5
3
0
0
0


Fixed submission (verdict: Accepted):
n, x, y = [int(i) for i in input().split()]
ans = [0]*n
for i in range(n-1):
    for j in range(i+1, n):
        ans[min(j-i, abs(x-(i+1))+abs((j+1)-y)+1)] += 1

print(*ans[1:], sep='\n')

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y=map(int,input().split())

def dis(a,b):
    return min (b-a,abs(a-x)+1+abs(b-y))









ans=[0]*(n-1)

for i in range(1,n):
  for j in range(i+1,n+1):
    ans[dis(i,j)-1]+=1
print(ans,sep="\n")

Failing test case input:
92 0 3

Expected output:
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Actual output:
[91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())

def dis(a,b):
    return min (b-a,abs(a-x)+1+abs(b-y))









ans=[0]*(n-1)

for i in range(1,n):
  for j in range(i+1,n+1):
    ans[dis(i,j)-1]+=1
print(*ans,sep="\n")
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(n):
    for j in range(i+1,n):
        if i <= x and j >= y:
            a = j-i-y+x+1
            l[a-1] += 1
        else:
            a = j-i
            l[a-1] += 1

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

Failing test case input:
68 1 3

Expected output:
68
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
68
67
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n+1):
        if j < x or i > y:
            a = j-i
            l[a] += 1
        else:
            p = j-i
            q = abs(j-y)+abs(i-x)+1
            a = min(p,q)
            l[a] +=1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n , x , y = map(int,input().split())
p = [[0 for i in range(j+1)] for j in range(n)]
for i in range(1,n+1):
    for j in range(1,i+1):
        p[i-1][j-1] = min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))

for i in range(1,n+1):
    ans = 0
    for j in range(n):
        ans += p[j].count(i)
    print(ans)

Failing test case input:
25 3 4

Expected output:
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Actual output:
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0


Fixed submission (verdict: Accepted):
n , x , y = map(int,input().split())
p = [0 for i in range(n)]
for i in range(1,n+1):
    for j in range(1,i+1):
        p[min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))] += 1
for i in range(1,n):
    print(p[i])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

from itertools import combinations

n,x,y=map(int,readline().split())
dis=[0]*n
lst=list(range(1,n+1))
for a,b in combinations(lst,2):
  dist=min(b-a, abs(x-a)+abs(y-b)+1,abs(y-a)+abs(x-b)+1)
  dis[dist]+=1
print(*dis,sep='\n')


Failing test case input:
23 2 5

Expected output:
23
23
21
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Actual output:
0
23
23
21
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

from itertools import combinations

n,x,y=map(int,readline().split())
dis=[0]*n
lst=list(range(1,n+1))
for a,b in combinations(lst,2):
  if b<=x or a>=y:
    dist=b-a
  else:
    dist=min(b-a, abs(x-a)+abs(y-b)+1)
  dis[dist]+=1
print(*dis[1:],sep='\n')
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y= map(int, input().split())
K = [0]*N
for i in range(1,N):
    for j in range(i+1, N+1):
        idx = min([j-i, abs(X-i)+ abs(j-Y)+1, abs(Y-i) + 1 + abs(X-j)])    
        K[idx] +=1
for value in K:
    print(value)

Failing test case input:
16 3 5

Expected output:
16
15
14
12
11
10
9
8
7
6
5
4
2
1
0


Actual output:
0
16
15
14
12
11
10
9
8
7
6
5
4
2
1
0


Fixed submission (verdict: Accepted):
N, X, Y= map(int, input().split())
K = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1, N+1):
        idx = min([j-i, abs(X-i)+ abs(j-Y)+1, abs(Y-i) + 1 + abs(X-j)])-1
        K[idx] +=1
for value in K:
    print(value)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y=map(int,input().split())
ans=[0]*n
for i in range(n):
    for j in range(i):
     dis=min(abs(i-j),abs(x-i)+1+abs(y-j))
     ans[dis]+=1
for i in ans:
    print(i)


Failing test case input:
10 4 9

Expected output:
10
12
11
7
4
1
0
0
0


Actual output:
0
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
ans=[0]*(n-1)
for i in range(1,n):
    for j in range(i+1,n+1):
     dis=min(abs(i-j),abs(x-i)+1+abs(y-j))-1
     ans[dis]+=1
for i in ans:
    print(i)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, X, Y = list(map(int, input().split()))






X -= 1
Y -= 1




def main(N, X, Y):
    ans = [0]*N
    for i in range(N):
        for j in range(i+1, N):
            d = min(j-i, abs(X-i)+abs(Y-j)+1)
            ans[d] += 1


main(N, X, Y)


Failing test case input:
14 1 8

Expected output:
14
15
16
13
9
8
7
5
3
1
0
0
0


Actual output:

Fixed submission (verdict: Accepted):

N, X, Y = list(map(int, input().split()))






X -= 1
Y -= 1




def main(N, X, Y):
    ans = [0]*N
    for i in range(N):
        for j in range(i+1, N):
            d = min(j-i, abs(X-i)+abs(Y-j)+1)
            ans[d] += 1

    for a in ans[1:]:
        print(a)


main(N, X, Y)

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

ans = [0] * (N - 1)

for i in range(1, N + 1, 1):
    for j in range(i + 1, N + 1, 1):
        tmp = min(
            abs(j - i),
            abs(X - i) + 1 + abs(j - Y),
            abs(X - j) + 1 + abs(i - Y) 
        )
        ans[tmp - 1] += 1


print(ans)

Failing test case input:
7 3 4

Expected output:
6
5
4
3
2
1


Actual output:
[6, 5, 4, 3, 2, 1]


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())

ans = [0] * (N - 1)

for i in range(1, N + 1, 1):
    for j in range(i + 1, N + 1, 1):
        tmp = min(
            abs(j - i),
            abs(X - i) + 1 + abs(j - Y),
            abs(X - j) + 1 + abs(i - Y) 
        )
        ans[tmp - 1] += 1

for a in ans:
    print(a)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())
t = [0 for i in range(n-1)]
x = x-1
y = y-1
for i in range(0,n):
  for j in range(i,n):
    a = abs(i-x)+abs(j-y)+1
    b = abs(i-j)
    if a < b:
      t[a-1] += 1
    else:
      t[b-1] += 1

for k in range(0,n-1):
  print(int(t[k]))

Failing test case input:
10 6 8

Expected output:
10
9
8
6
5
4
2
1
0


Actual output:
10
9
8
6
5
4
2
1
10


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())
t = [0 for i in range(n)]
x = x-1
y = y-1
for i in range(0,n):
  for j in range(i,n):
    a = abs(i-x)+abs(j-y)+1
    b = abs(i-j)
    if a < b:
      t[a-1] += 1
    else:
      t[b-1] += 1

for k in range(0,n-1):
  print(int(t[k]))

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(i - X))
        ans[c] = ans.get(c, 0) + 1

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


Failing test case input:
17 3 5

Expected output:
17
16
15
13
12
11
10
9
8
7
6
5
4
2
1
0


Actual output:
17
16
44
10
24
6
16
2
1
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
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])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int,input().split())
a = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1), abs(i-y+1)+1+abs(j-x+1))
for ans in a:
    print(ans)

Failing test case input:
92 1 3

Expected output:
92
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n,x,y = map(int,input().split())
a = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1))
        a[dist-1] += 1
for ans in a:
    print(ans)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
tmp = list(map(int, input().split()))
n, x, y = tmp
cnt = [0 for k in range(n-1)]

for i in range(n-1):
    for j in range(i+1, n):
        if i+1 > x or j+1 < y:
            cnt[j-i-1] += 1
        else:
            c = j+x+1-i-y
            cnt[c-1] += 1

for c in cnt:
    print(c)

Failing test case input:
25 2 11

Expected output:
25
27
29
30
26
20
18
17
16
15
14
13
12
11
10
8
5
3
1
0
0
0
0
0


Actual output:
25
25
24
23
22
21
20
19
17
15
14
13
12
11
10
8
6
5
4
3
2
1
0
0


Fixed submission (verdict: Accepted):
tmp = list(map(int, input().split()))
n, x, y = tmp
cnt = [0 for k in range(n-1)]

for i in range(n-1):
    for j in range(i+1, n):
        a = j-i
        b = abs(x-i-1) + 1 + abs(j+1-y)
        cnt[min(a,b)-1] += 1

for c in cnt:
    print(c)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = []
for i in range(n):
    for j in range(i+1, n):
        a = min([j-i, abs(x-i)+abs(y-j)+1, abs(y-i)+abs(x-j)+1]) 
        ans.append(a)
ans = [str(l) for l in ans]
print(type(ans))

for k in range(1, n):
    finalans=ans.count(str(k))
    print(finalans)


Failing test case input:
25 1 3

Expected output:
25
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
<class 'list'>
25
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Fixed submission (verdict: Accepted):


n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = [0] * n
for i in range(n):
    for j in range(i+1, n):
        dist = min([j-i, abs(x-i)+abs(y-j)+1, abs(y-i)+abs(x-j)+1]) 
        ans[dist] += 1
for k in range(1, n):
    print(ans[k])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n):
        if i <= x and j >= y:
            a = j-i-y+x+1
            l[a] += 1
        else:
            a = j-i
            l[a] += 1

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

Failing test case input:
10 5 9

Expected output:
10
12
9
6
5
3
0
0
0


Actual output:
9
8
7
5
4
2
1
0
0


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n+1):
        if j < x or i > y:
            a = j-i
            l[a] += 1
        else:
            p = j-i
            q = abs(j-y)+abs(i-x)+1
            a = min(p,q)
            l[a] +=1

for i in range(1,n):
    print(l[i])
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())
A = [0]*N
for i in range(1, N):
    for j in range(i+1, N+1):
        if i<=X and j>=Y:
            A[j-i-Y+X+1] += 1
        else:
            A[j-i] += 1
for i in range(1, N):
    print(A[i])

Failing test case input:
25 1 11

Expected output:
25
26
27
28
29
19
18
17
16
15
14
13
12
11
10
8
6
4
2
0
0
0
0
0


Actual output:
25
24
23
22
21
20
19
18
17
15
14
13
12
11
10
8
7
6
5
4
3
2
1
0


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

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

import sys
input = lambda: sys.stdin.readline().strip()
n, x, y = [int(x) for x in input().split()]
ans = [0 for k in range(n)]
for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
        ans[min(abs(i - j), abs(x - i) + 1 + abs(y - j), abs(y - i) + 1 + abs(x - j))] += 1
print(*(ans), sep='\n')


Failing test case input:
11 4 5

Expected output:
10
9
8
7
6
5
4
3
2
1


Actual output:
0
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):

import sys
input = lambda: sys.stdin.readline().strip()
n, x, y = [int(x) for x in input().split()]
ans = [0 for k in range(n)]
for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
        ans[min(abs(i - j), abs(x - i) + 1 + abs(y - j), abs(y - i) + 1 + abs(x - j))] += 1
print(*(ans[1:]), sep='\n')

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x, y = map(int, input().split())


def distance(i,j):
    d = abs(i-y)+1+abs(j-x)    
    d = min(j-i, d)
    return d

d = [0]*(n-1)
for i in range(1, n+1):
    for j in range(i+1,n+1):
        d[distance(i,j)-1] = d[distance(i,j)-1] + 1

for i in d:
    print(i)

Failing test case input:
25 1 11

Expected output:
25
26
27
28
29
19
18
17
16
15
14
13
12
11
10
8
6
4
2
0
0
0
0
0


Actual output:
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):

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

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

for i in d:
    print(i)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y=map(int,input().split())
ans=[0]*n
for i in range(n):
    for j in range(i+1,n):
     dis=min(abs(i-j),abs(x-i)+1+abs(y-j))
     ans[dis]+=1
for i in ans:
    print(i)


Failing test case input:
12 2 6

Expected output:
12
14
11
8
7
6
5
3
0
0
0


Actual output:
0
12
14
12
10
7
6
4
1
0
0
0


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
ans=[0]*(n-1)
for i in range(1,n):
    for j in range(i+1,n+1):
     dis=min(abs(i-j),abs(x-i)+1+abs(y-j))-1
     ans[dis]+=1
for i in ans:
    print(i)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = [int(n) for n in input().split()]


ans = [0] * (n-1)

for i in range(n-1):
    for j in range(i+1,n):
        a=j-i
        b=abs(y-j)+abs(i-x)+1
        ans[min(a,b)-1]+=1
for i in ans:
	print(i)    

Failing test case input:
92 1 3

Expected output:
92
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
92
91
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
1
0


Fixed submission (verdict: Accepted):
n,x,y = [int(n) for n in input().split()]


ans = [0] * (n-1)

for i in range(n-1):
    for j in range(i+1,n):
        a=j-i
        b=abs((y-1)-j)+abs(i-(x-1))+1
        ans[min(a,b)-1]+=1
for i in ans:
	print(i)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(n):
    for j in range(i+1,n):
        if i <= x and j >= y:
            a = j-i-y+x+1
            l[a] += 1
        else:
            a = j-i
            l[a] += 1

for i in range(n):
    print(l[i])

Failing test case input:
12 8 9

Expected output:
11
10
9
8
7
6
5
4
3
2
1


Actual output:
0
11
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n+1):
        if j < x or i > y:
            a = j-i
            l[a] += 1
        else:
            p = j-i
            q = abs(j-y)+abs(i-x)+1
            a = min(p,q)
            l[a] +=1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

node_num, l_connected_node, g_connected_node = [int(n) for n in input().rstrip().split()]

l_connected_node-=1
g_connected_node-=1

count=[0]*node_num

for i in range(node_num-1):
    for j in range(i+1, node_num):
        count[min(j-i, abs(i-l_connected_node)+abs(j-g_connected_node)+1)]+=1

for x in range(1, node_num):
    print(x,'jump :',count[x])

Failing test case input:
10 5 9

Expected output:
10
12
9
6
5
3
0
0
0


Actual output:
1 jump : 10
2 jump : 12
3 jump : 9
4 jump : 6
5 jump : 5
6 jump : 3
7 jump : 0
8 jump : 0
9 jump : 0


Fixed submission (verdict: Accepted):
node_num, l_connected_node, g_connected_node = [int(n) for n in input().rstrip().split()]

l_connected_node-=1
g_connected_node-=1

count=[0]*node_num

for i in range(node_num-1):
    for j in range(i+1, node_num):
        count[min(j-i, abs(i-l_connected_node)+abs(j-g_connected_node)+1)]+=1

for x in range(1, node_num):
    print(count[x])
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n+1):
        if i <= x and j >= y:
            a = j-i-y+x+1
            l[a] += 1
        else:
            a = j-i
            l[a] += 1

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

Failing test case input:
9 1 6

Expected output:
9
10
8
5
3
1
0
0


Actual output:
9
8
7
6
3
2
1
0


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())

l = [0] * n


for i in range(1,n):
    for j in range(i+1,n+1):
        if j < x or i > y:
            a = j-i
            l[a] += 1
        else:
            p = j-i
            q = abs(j-y)+abs(i-x)+1
            a = min(p,q)
            l[a] +=1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

ans = [0] * (N-1)
for i in range(1,N+1):
	for j in range(i+1, N+1):
		k = min(j-i, abs(X-i) + abs(Y-j) + 1)
		ans[k-1] += 1

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



Failing test case input:
34 1 5

Expected output:
34
35
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Actual output:
[34, 35, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 2, 0, 0]
34
35
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())

ans = [0] * (N-1)
for i in range(1,N+1):
	for j in range(i+1, N+1):
		k = min(j-i, abs(X-i) + abs(Y-j) + 1)
		ans[k-1] += 1

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())

ls = [0] * N
for i in range(1, N+1):
    for j in range(i+1, N+1):
        dis = min([abs(j-i), abs(X-i) + 1 + abs(j-Y), abs(Y-i) + 1 + abs(j-X)])
        ls[dis] += 1

for i in range(len(ls)):
    print(ls[i])

Failing test case input:
18 1 5

Expected output:
18
19
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Actual output:
0
18
19
15
14
13
12
11
10
9
8
7
6
5
4
2
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())
ls = [0] * N
for i in range(1, N+1):
    for j in range(i+1, N+1):
        dis = min([abs(j-i), abs(X-i) + 1 + abs(j-Y), abs(Y-i) + 1 + abs(j-X)])
        ls[dis] += 1
for i in range(1, len(ls)):
    print(ls[i])

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = list(map(int,input().split()))
X -= 1
Y -= 1
out = [0]*N
for i in range(N-1):
  for j in range(i+1,N):
    out[min(j-i, abs(i-X)+1+abs(j-Y))] += 1
for i in range(N-1):
  print(out[i])

Failing test case input:
17 4 5

Expected output:
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Actual output:
0
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2


Fixed submission (verdict: Accepted):
N, X, Y = list(map(int,input().split()))
X -= 1
Y -= 1
out = [0]*N
for i in range(N-1):
  for j in range(i+1,N):
    out[min(j-i, abs(i-X)+1+abs(j-Y))] += 1
for i in range(1,N):
  print(out[i])
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X,Y = map(int,input().split())
ans = [0 for i in range(N-1)]
for i in range(1,N):
    for j in range(i+1,N+1):
        mina = min(j-i, abs(X-i)+1+abs(Y-j), abs(Y-i)+1+abs(X-i))
        ans[mina-1] += 1
for i in ans:
    print(i)

Failing test case input:
12 4 6

Expected output:
12
11
10
9
7
6
5
3
2
1
0


Actual output:
12
11
21
6
7
2
4
1
2
0
0


Fixed submission (verdict: Accepted):
N,X,Y = map(int,input().split())
ans = [0 for i in range(N-1)]
for i in range(1,N):
    for j in range(i+1,N+1):
        mina = min(j-i, abs(X-i)+1+abs(Y-j), abs(Y-i)+1+abs(X-j))
        ans[mina-1] += 1
for i in ans:
    print(i)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y=map(int,input().split())
List=[]
i=1
for j in range(2,N+1):
  while 0<i<j<=N:
    List.append(min([abs(j-i), abs(X-i)+abs(Y-j)+1]))
    i+=1  
  else:
    j+=1  
    i=1
List.sort()

import collections
c=collections.Counter(List)
Newlist=list(c.values())
for p in Newlist:
  print(p)

Failing test case input:
9 2 4

Expected output:
9
8
6
5
4
3
1
0


Actual output:
9
8
6
5
4
3
1


Fixed submission (verdict: Accepted):
N, X, Y=map(int,input().split())
List=[]
i=1
for j in range(2,N+1):
  for i in range(1,j):
    List.append(min([abs(j-i), abs(X-i)+abs(Y-j)+1]))

List.sort()

import collections
C=collections.Counter(List)

for p in range(1,N):
  if p in C.keys():
    print(C[p])
  else:
    print(0)

Problem: p02726
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N+1):
    for y in range(x + 1, N+1):
        res.append(min([abs(x-y), 1 + abs(X-x) + abs(Y-y), 1 + abs(Y-x) + abs(X-x)]))
resd = Counter(res)

for i in range(1, N):
    if i in resd:
        print(resd[i])
    else:
        print(0)

Failing test case input:
8 4 5

Expected output:
7
6
5
4
3
2
1


Actual output:
7
9
3
4
2
2
1


Fixed submission (verdict: Accepted):
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min(abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from itertools import combinations
N,X,Y=(int(x) for x in input().split())
result=[]
for i in combinations(range(1,N+1),2):
	result.append(min(abs(i[0]-X)+abs(i[1]-Y)+1,i[1]-i[0]))
for i in range(1,N+1):
  print(result.count(i))

Failing test case input:
20 3 5

Expected output:
20
19
18
16
15
14
13
12
11
10
9
8
7
6
5
4
2
1
0


Actual output:
20
19
18
16
15
14
13
12
11
10
9
8
7
6
5
4
2
1
0
0


Fixed submission (verdict: Accepted):
from itertools import combinations
N,X,Y=(int(x) for x in input().split())
result={x:0 for x in range(1,N)}
for i in combinations(range(1,N+1),2):
	result[min(abs(i[0]-X)+abs(i[1]-Y)+1,i[1]-i[0])] += 1
for i in range(1,N):
  print(result[i])
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, R1, R2 = map(int, input().split())
count={}
for m in range(N-1):
    count[m+1] = 0 
for i in range(N):
    for j in range(i+1, N):
        if i <= R1-1 and j >= R2-1:
            count[j-i-(R2-R1-1)] +=1
        else:
            count[j-i] += 1
for k in count.values():
    print(k)


Failing test case input:
19 1 8

Expected output:
19
20
21
18
14
13
12
11
10
9
8
7
5
3
1
0
0
0


Actual output:
19
18
17
16
15
14
12
11
10
9
8
7
5
4
3
2
1
0


Fixed submission (verdict: Accepted):
N, R1, R2 = map(int, input().split())
n = R2 - R1 - 1
count={}
for m in range(N-1):
    count[m+1] = 0 
for i in range(N):
    for j in range(i+1, N):
        k = min(j-i, abs((R1-1)-i) + 1 +abs((R2-1)-j))
        count[k]+=1
for k in count.values():
    print(k)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X,Y = map(int,input().split())
li = [0]*(N-1)
for i in range(0,N-1):
    for j in range(i+1,N):
        dis = min(j-i,abs(j-(X-1))+1+abs(i-(Y-1)))
        li[dis-1] += 1
for ans in li:
    print(ans)

Failing test case input:
68 1 3

Expected output:
68
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0


Actual output:
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
N,X,Y = map(int,input().split())
li = [0]*(N-1)
for i in range(0,N-1):
    for j in range(i+1,N):
        dis = min(j-i,abs(i-(X-1))+1+abs(j-(Y-1)))
        li[dis-1] += 1
for ans in li:
    print(ans)

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int, input().split())
max_dis = 0
ans = [0]*n
for i in range(1, n):
    for j in range(i+1,n+1):
        ans[min(abs(i-j), (abs(x-i)+1 +abs(y-j)))] +=1
print(*ans, sep="\n")

Failing test case input:
7 3 4

Expected output:
6
5
4
3
2
1


Actual output:
0
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
n,x,y = map(int, input().split())
max_dis = 0
ans = [0]*n
for i in range(1, n):
    for j in range(i+1,n+1):
        ans[min(abs(i-j), (abs(x-i)+1 +abs(y-j)))] +=1
print(*ans[1:], sep="\n")

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X, Y = map(int, input().split())
d = Y-X
c = []
for i in range(1,N):
  for j in range(i+1,N+1):
    if i == X and j == Y:
      c.append(1)
    elif j-i<=d:
      c.append(j-i)
    else:
      c.append(j-i-d+1)
for i in range(1,N):
  ans = c.count(i)
  print(ans)
  


Failing test case input:
10 1 8

Expected output:
10
11
12
8
3
1
0
0
0


Actual output:
10
10
8
6
5
4
2
0
0


Fixed submission (verdict: Accepted):
N, X, Y = map(int, input().split())
c = [0 for i in range(N)]
for i in range(1,N):
  for j in range(i+1,N+1):
    x = abs(X-i)
    y = abs(Y-j)
    a = min(x+y+1,j-i)
    c[a]+=1

for i in range(1,N):
  ans = c[i]
  print(ans)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y = map(int,input().split())
x-=1
y-=1

ans = [0]*(n)
tmp = 10000000000000000
for i in range(n-1):
    for j in range(i+1,n):
        if i == j:continue
        tmp = min((j-i),abs(j-y)+abs(i-x)+1)
 
        ans[tmp] +=1



for i in ans:
    print(i)



Failing test case input:
12 1 4

Expected output:
12
11
9
8
7
6
5
4
3
1
0


Actual output:
0
12
11
9
8
7
6
5
4
3
1
0


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

ans = [0]*(n)
tmp = 10000000000000000
for i in range(n-1):
    for j in range(i+1,n):
        if i == j:continue
        tmp = min((j-i),abs(j-y)+abs(i-x)+1)
 
        ans[tmp] +=1



for i in ans[1:]:
    print(i)

Problem: p02726
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,x,y=map(int,input().split())
l=[]
for i in range(n-1):
  for j in range(i+1,n):
    if i<=x-1 and j>=y-1:
      d=(x-1)-i+j-(y-1)+1
    else:
      d=j-i
    l.append(d)
import collections
c=collections.Counter(l)
for kk in range(1,n):
  print(c[kk])

Failing test case input:
17 1 13

Expected output:
17
18
19
20
21
21
8
6
4
2
0
0
0
0
0
0


Actual output:
17
16
15
14
13
11
10
9
8
7
6
4
3
2
1
0


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
l=[]
for i in range(n-1):
  for j in range(i+1,n):
    d1=j-i
    d2=abs((x-1)-i)+abs(j-(y-1))+1
    d=min(d1,d2)
    l.append(d)
import collections
c=collections.Counter(l)
for kk in range(1,n):
  print(c[kk])

Problem: p02726
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x,y=map(int,input().split())
x-=1 ; y-=1
A=[0 for i in range(n+8)]

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

Failing test case input:
11 1 7

Expected output:
11
12
13
7
6
4
2
0
0
0


Actual output:
10
9
8
7
6
5
4
3
2
1


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
x-=1 ; y-=1
A=[0 for i in range(n+8)]

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

Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y= map(int,input().split(' '))
arr=[n-i for i in range(n)]

cut= y-x
for j in range(1,x+1):
    for i in range(y,n+1):
        dist= (i-y)+1+(x-j)
        arr[dist]+=1
        arr[cut+dist-1]-=1
for a in arr[1:]:
    print(a)


Failing test case input:
9 1 6

Expected output:
9
10
8
5
3
1
0
0


Actual output:
9
8
7
6
3
2
1
0


Fixed submission (verdict: Accepted):
n,x,y= map(int,input().split(' '))
arr=[0 for i in range(n)]

for i in range(1,n+1):
    for j in range(i+1,n+1):
        dist= j-i
        alt_dist= abs(x-i)+1+abs(y-j)
        if alt_dist<dist:
            dist=alt_dist
        arr[dist]+=1
for a in arr[1:]:
    print(a)
Problem: p02726
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x,y=map(int,input().split())
x-=1
y-=1
a=[]
for i in range(n):
  a.append(0)
for i in range(n):
  for j in range(n-i):
    p=min(abs(j-i),abs(x-i)+abs(y-j)+1,abs(y-i)+abs(x-j)+1)
    a[p]+=1
for i in range(n-1):
  print(str(a[i+1]))

Failing test case input:
25 2 6

Expected output:
25
27
24
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
3
0
0
0


Actual output:
26
32
26
22
20
20
18
18
16
16
14
14
12
12
10
10
8
8
6
2
2
0
0
0


Fixed submission (verdict: Accepted):
n,x,y=map(int,input().split())
x-=1
y-=1
a=[]
for i in range(n):
  a.append(0)
for i in range(n-1):
  for j in range(n-i):
    j=n-1-j
    p=min(abs(j-i),abs(x-i)+abs(y-j)+1,abs(y-i)+abs(x-j)+1)
    a[p]+=1
for i in range(n-1):
  print(str(a[i+1]))