ZhenlongDai/ACPR huggingface dataset:
Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def warshall_floyd(graph):
    num_v = len(graph)
    for i in range(num_v):
        for j in range(num_v):
            for k in range(num_v):
                graph[i][j] = min(graph[i][j], graph[i][k] + graph[k][j])
    return graph


h, w = map(int, input().split())
route = [[float("inf") for _ in range(10)] for _ in range(10)]

for i in range(10):
    S = list(map(int, input().split()))
    for j in range(10):
        route[i][j] = S[j]
graph = warshall_floyd(route)
result = 0
for i in range(h):
    A = list(map(int, input().split()))
    for a in A:
        if a == -1:
            continue
        else:
            result += graph[a][1]
print(result)



Failing test case input:
2 5
0 4 -1 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 10
5 7 1 7 -1 18 1 2 9 1
4 0 2 0 0 7 7 4 2 3
3 5 7 0 0 6 12 7 6 7
1 8 5 1 2 0 4 7 6 5
5 4 23 4 2 3 0 5 2 4
3 5 2 0 4 2 4 0 1 9
4 6 5 4 3 2 2 0 0 8
3 1 0 6 5 7 2 6 4 0
-1 1 2 4 1
2 5 3 2 1
8 9 2 6 6

Expected output:
-4


Actual output:
7


Fixed submission (verdict: Accepted):
def warshall_floyd(graph):
    num_v = len(graph)
    for k in range(num_v):
        for i in range(num_v):
            for j in range(num_v):
                graph[i][j] = min(graph[i][j], graph[i][k] + graph[k][j])
    return graph


h, w = map(int, input().split())
route = []

for i in range(10):
    S = list(map(int, input().split()))
    route.append(S)
graph = warshall_floyd(route)
result = 0
for i in range(h):
    A = list(map(int, input().split()))
    for a in A:
        if a != -1:
            result += graph[a][1]
print(result)

Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w=map(int,input().split())
cost=[list(map(int,input().split())) for i in range(10)]
for i in range(10):
  for j in range(10):
    for k in range(10):
      cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
wall=[list(map(int,input().split())) for i in range(h)]
ans=0
for i in range(h):
  for j in wall[i]:
    if j==-1:continue
    ans+=cost[j][1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 0 18 1 2 9 0
3 0 2 0 2 7 6 4 2 3
3 5 7 0 0 6 1 7 6 7
9 8 5 2 2 0 2 7 6 10
5 4 6 3 2 3 0 5 1 0
3 6 0 0 4 2 4 0 11 9
4 6 5 5 3 5 3 2 0 8
3 1 3 4 5 7 8 6 4 0
-1 5 2 6 1
2 5 4 2 1
8 9 2 6 6

Expected output:
10


Actual output:
14


Fixed submission (verdict: Accepted):
h,w=map(int,input().split())
cost=[list(map(int,input().split())) for i in range(10)]
for i in range(10):
  for j in range(10):
    for k in range(10):
      cost[j][k]=min(cost[j][k],cost[j][i]+cost[i][k])
ans=0
for i in range(h):
    a=map(int,input().split())
    for j in a:
        if j==-1:continue
        ans+=cost[j][1]
print(ans)
Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, W = map(int, input().split())
c = [[0]*10 for i in range(10)]
for i in range(10):
    a = list(map(int, input().split()))
    for j in range(10):
        c[i][j] = a[j]

A = [[0]*W for i in range(H)]
for i in range(H):
    a = list(map(int, input().split()))
    for j in range(W):
        A[i][j] = a[j]

for i in range(10):
    for j in range(10):
        for k in range(10):
            if i != j:
                c[i][j] = min(c[i][j], c[i][k]+c[k][j])

ans = 0
for i in range(H):
    for j in range(W):
        if A[i][j] != -1 and A[i][j] != 1:
            ans += c[A[i][j]][1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 7
5 7 0 7 0 9 1 3 9 1
3 6 2 0 2 7 6 4 2 3
3 5 6 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 0 4 3
0 6 3 0 4 2 4 0 8 9
4 6 5 8 3 5 3 2 0 8
2 1 3 4 5 7 15 6 4 0
0 5 3 6 1
1 5 3 3 1
6 9 2 5 6

Expected output:
34


Actual output:
37


Fixed submission (verdict: Accepted):
H, W = map(int, input().split())
c = [[0]*10 for i in range(10)]
for i in range(10):
    a = list(map(int, input().split()))
    for j in range(10):
        c[i][j] = a[j]

A = [[0]*W for i in range(H)]

for i in range(H):
    a = list(map(int, input().split()))
    for j in range(W):
        A[i][j] = a[j]

for k in range(10):
    for i in range(10):
        for j in range(10):
            for k in range(10):
                if i != j:
                    c[i][j] = min(c[i][j], c[i][k]+c[k][j])

ans = 0
for i in range(H):
    for j in range(W):
        if A[i][j] != -1 and A[i][j] != 1:
            ans += c[A[i][j]][1]
print(ans)

Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w = map(int,input().split())
ij = [list(map(int,input().split())) for x in range(10)]
dp = [[100 for i in range(10)] for i in range(10)]
for i in range(10):
    dp[i][0] = ij[i][1]
for i in range(1,10):
    for j in range(10):
        num = dp[j][i-1]
        for k in range(10):
            num = min(num,ij[j][k] + dp[k][j-1])
        dp[j][i] = num
ans = 0
for i in range(h):
    for j in list(map(int,input().split())):
        if j == -1:break
        ans += dp[j][-1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 3 5 3 0
4 0 5 3 12 5 3 10 2 11
5 7 0 7 0 18 1 2 9 0
3 0 2 0 2 7 6 4 2 3
3 5 7 0 0 6 1 7 6 7
9 8 5 2 2 0 2 7 6 10
5 4 6 0 2 3 0 5 0 3
3 6 0 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
3 1 3 4 5 7 8 12 4 0
-1 5 2 6 1
2 5 4 2 1
8 9 2 6 6

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
h,w = map(int,input().split())
ij = [list(map(int,input().split())) for x in range(10)]
for k in range(10):
    for i in range(10):
        for j in range(10):
            ij[i][j] = min(ij[i][j],ij[i][k]+ij[k][j])
ans = 0
for i in range(h):
    for j in list(map(int,input().split())):
        if j == -1:continue
        ans += ij[j][1]
print(ans)
Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w=map(int,input().split())
wlist=[[0]*10 for _  in range(10)]
for i in range(10):
    b=list(map(int,input().split()))
    for j in range(10):
        wlist[i][j]=b[j]
for i in range(10):
    for j in range(10):
        for k in range(10):
            wlist[i][j]=min(wlist[i][j],wlist[i][k]+wlist[k][j])
ans=0
for _ in range(h):
    t=list(map(int,input().split()))
    for i in t:
        if i==-1 or i==1:
            continue
        else:
            ans+=wlist[i][1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 0 18 1 2 9 0
3 0 2 0 2 7 6 4 2 3
3 5 7 0 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 1 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
3 1 3 4 5 7 8 6 4 0
-1 5 2 6 1
2 5 4 2 1
6 9 2 6 6

Expected output:
13


Actual output:
17


Fixed submission (verdict: Accepted):
h,w=map(int,input().split())
wlist=[list(map(int,input().split()))for _ in range(10)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            wlist[j][k]=min(wlist[j][k],wlist[j][i]+wlist[i][k])
ans=0
for _ in range(h):
    t=list(map(int,input().split()))
    for i in t:
        if i==-1 or i==1:
            continue
        else:
            ans+=wlist[i][1]
print(ans)

Problem: p03546
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def warshall_floyd():
    for middle in range(10):
        for start in range(10):
            for end in range(10):
                costs[start][end] = min(costs[start][end], costs[start][middle] + costs[middle][end])


H, W = map(int, input().split())
costs = []

for i in range(10):
    costs.append(list(map(int, input().split())))

warshall_floyd()

print(*costs, sep='\n')
ans = 0
for i in range(H):
    wall = list(map(int, input().split()))
    for num in wall:
        if num != -1:
            ans += costs[num][1]
print(ans)

Failing test case input:
2 4
0 9 9 9 9 9 9 9 13 9
9 0 9 9 9 9 9 9 9 9
9 9 0 9 9 9 9 9 9 9
9 9 9 0 2 9 9 9 9 9
6 9 9 9 0 9 9 9 9 1
9 9 9 15 15 0 9 9 9 9
9 9 9 9 9 9 0 9 9 9
9 9 9 9 9 2 9 0 9 9
9 9 9 5 3 9 9 9 0 9
9 2 9 9 9 9 2 9 9 0
-1 -1 -1 -1
0 1 1 8

Expected output:
15


Actual output:
[0, 9, 9, 9, 9, 9, 9, 9, 13, 9]
[9, 0, 9, 9, 9, 9, 9, 9, 9, 9]
[9, 9, 0, 9, 9, 9, 9, 9, 9, 9]
[8, 5, 9, 0, 2, 9, 5, 9, 9, 3]
[6, 3, 9, 9, 0, 9, 3, 9, 9, 1]
[9, 9, 9, 14, 12, 0, 9, 9, 9, 9]
[9, 9, 9, 9, 9, 9, 0, 9, 9, 9]
[9, 9, 9, 9, 9, 2, 9, 0, 9, 9]
[9, 6, 9, 5, 3, 9, 6, 9, 0, 4]
[9, 2, 9, 9, 9, 9, 2, 9, 9, 0]
15


Fixed submission (verdict: Accepted):
def warshall_floyd():
    for middle in range(10):
        for start in range(10):
            for end in range(10):
                costs[start][end] = min(costs[start][end], costs[start][middle] + costs[middle][end])


H, W = map(int, input().split())
costs = []

for i in range(10):
    costs.append(list(map(int, input().split())))

warshall_floyd()


ans = 0
for i in range(H):
    wall = list(map(int, input().split()))
    for num in wall:
        if num != -1:
            ans += costs[num][1]
print(ans)
Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, w = map(int, input().split())

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

def wf(table):
    from itertools import product
    for i, j, k in product(range(len(table)), repeat=3):
        table[i][j] = min(table[i][j], table[i][k] + table[k][j])

    return table

table = wf(table)

ans = 0
for _ in range(h):
    for i in map(int, input().split()):
        if i != -1:
            ans += table[i][1]

print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 0 18 1 2 9 0
3 0 2 0 2 7 6 4 2 3
3 5 7 0 0 6 1 7 6 7
9 8 5 2 2 0 2 7 6 10
5 4 6 3 2 3 0 5 1 3
3 6 0 0 4 2 4 0 11 9
4 6 5 5 3 5 3 2 0 8
3 1 3 4 5 7 8 6 4 0
-1 5 2 6 1
2 5 4 2 1
8 9 2 6 6

Expected output:
13


Actual output:
17


Fixed submission (verdict: Accepted):
h, w = map(int, input().split())

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

def wf(table):
    from itertools import product
    for k, i, j in product(range(len(table)), repeat=3):
        table[i][j] = min(table[i][j], table[i][k] + table[k][j])

    return table

table = wf(table)

ans = 0
for _ in range(h):
    for i in map(int, input().split()):
        if i != -1:
            ans += table[i][1]

print(ans)

Problem: p03546
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict

h,w=map(int,input().split())
c=[]
dic=defaultdict(int)
for _ in range(10): c.append(list(map(int,input().split())))
for _ in range(h):
    temp=list(map(int,input().split()))
    for i in temp: dic[i]+=1
for k in range(10):
    for i in range(10):
        for j in range(10): c[i][j]=min(c[i][j],c[i][k]+c[k][j])
ans=0
for item in dic.items():
    if item[0]: ans+=item[1]*c[item[0]][1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 2 9 1 2 9 0
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
0 5 2 6 1
2 5 3 2 1
6 9 2 6 6

Expected output:
35


Actual output:
34


Fixed submission (verdict: Accepted):
from collections import defaultdict

h,w=map(int,input().split())
c=[]
dic=defaultdict(int)
for _ in range(10): c.append(list(map(int,input().split())))
for _ in range(h):
    temp=list(map(int,input().split()))
    for i in temp: dic[i]+=1
for k in range(10):
    for i in range(10):
        for j in range(10): c[i][j]=min(c[i][j],c[i][k]+c[k][j])
ans=0
for item in dic.items():
    if item[0]>=0: ans+=item[1]*c[item[0]][1]
print(ans)
Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, w = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
a = [list(map(int, input().split())) for _ in range(h)]

for x in range(10):
    for y in range(10):
        for z in range(10):
            c[y][z] = min(c[y][z], c[y][x] + c[x][z])

ans = 0
for x in range(h):
    for y in range(w):
        if a[x][y] > 1:
            ans += c[a[x][y]][1]

print(ans)


Failing test case input:
2 4
0 9 9 9 9 9 9 9 13 9
9 0 9 9 9 9 9 9 9 9
9 9 0 9 9 9 9 9 9 9
9 9 9 0 2 9 9 9 9 9
6 9 9 9 0 9 9 9 9 1
9 9 9 15 15 0 9 9 9 9
9 9 9 9 9 9 0 9 9 9
9 9 9 9 9 2 9 0 9 9
9 9 9 5 2 9 9 9 0 9
9 2 9 9 9 9 2 9 9 0
-1 -1 -1 -1
0 1 1 8

Expected output:
14


Actual output:
5


Fixed submission (verdict: Accepted):
h, w = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
a = [list(map(int, input().split())) for _ in range(h)]

for x in range(10):
    for y in range(10):
        for z in range(10):
            c[y][z] = min(c[y][z], c[y][x] + c[x][z])

ans = 0
for x in range(h):
    for y in range(w):
        if a[x][y] >= 0:
            ans += c[a[x][y]][1]

print(ans)

Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
from collections import deque
h, w = map(int, input().split())
c = []
for i in range(10):
  s = list(map(int, input().split()))
  c.append(s)

a = []
for i in range(h):
  b = list(map(int, input().split()))
  a.append(b)


d = c
for i in range(10):
  for j in range(10):
    for k in range(10):
      d[i][j] = min(d[i][k]+d[k][j], d[i][j])

ans = 0

for i in range(h):
  for j in range(w):
    if a[i][j] == -1:
      continue
    x = a[i][j]
    ans += d[x][1]
print (ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 7
5 7 0 7 0 9 1 3 9 1
3 6 2 0 2 7 6 4 2 3
3 5 6 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 0 4 3
0 6 3 0 4 2 4 0 8 9
4 6 5 8 3 5 3 2 0 8
2 1 3 4 5 7 15 6 4 0
0 5 3 6 1
1 5 3 3 1
6 9 2 5 6

Expected output:
34


Actual output:
37


Fixed submission (verdict: Accepted):
from collections import defaultdict
h, w = map(int, input().split())
c = []
for i in range(10):
  s = list(map(int, input().split()))
  c.append(s)

a = []
for i in range(h):
  b = list(map(int, input().split()))
  a.append(b)


d = c
for k in range(10):
  for i in range(10):
    for j in range(10):
      d[i][j] = min(d[i][k]+d[k][j], d[i][j])

ans = 0

for i in range(h):
  for j in range(w):
    if a[i][j] == -1:
      continue
    x = a[i][j]
    ans += d[x][1]
print (ans)
Problem: p03546
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

w, h = read_line(int, int)

c = []
for _ in range(10):
    c.append(read_line(int, int, int, int, int, int, int, int, int, int))

for k in range(10):
    for i in range(10):
        for j in range(10):
            if i != j:
                c[i][j] = min(c[i][j], c[i][k] + c[k][j])

cost = 0
for _ in range(w):
    for a in read_line(*([int] * h)):
        if a > 0:
            cost += c[a][1]

print(cost)


Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 3
4 0 5 3 12 5 3 7 2 7
5 7 0 7 2 9 1 2 9 1
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
0 5 2 6 1
2 5 3 2 1
6 9 2 5 6

Expected output:
47


Actual output:
43


Fixed submission (verdict: Accepted):
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

w, h = read_line(int, int)

c = []
for _ in range(10):
    c.append(read_line(int, int, int, int, int, int, int, int, int, int))

for k in range(10):
    for i in range(10):
        for j in range(10):
            if i != j:
                c[i][j] = min(c[i][j], c[i][k] + c[k][j])

cost = 0
for _ in range(w):
    for a in read_line(*([int] * h)):
        if a >= 0:
            cost += c[a][1]

print(cost)

Problem: p03546
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w=map(int,input().split())
wlist=[[0]*10 for _  in range(10)]
for i in range(10):
    b=list(map(int,input().split()))
    for j in range(10):
        wlist[i][j]=b[j]
for i in range(10):
    for j in range(10):
        for k in range(10):
            wlist[i][k]=min(wlist[i][k],wlist[i][j]+wlist[j][k])
ans=0
for _ in range(h):
    t=list(map(int,input().split()))
    for i in t:
        if i==-1 or i==1:
            continue
        else:
            ans+=wlist[i][1]
print(ans)

Failing test case input:
3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 0 18 1 2 9 0
3 0 2 0 2 7 6 4 2 3
3 5 7 0 0 6 1 7 6 7
9 8 5 2 2 0 2 7 6 10
5 4 6 3 2 3 0 5 1 0
3 6 0 0 4 2 4 0 11 9
4 6 5 5 3 5 3 2 0 8
3 1 3 4 5 7 8 6 4 0
-1 5 2 6 1
2 5 4 2 1
8 9 2 6 6

Expected output:
10


Actual output:
14


Fixed submission (verdict: Accepted):
h,w=map(int,input().split())
wlist=[list(map(int,input().split()))for _ in range(10)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            wlist[j][k]=min(wlist[j][k],wlist[j][i]+wlist[i][k])
ans=0
for _ in range(h):
    t=list(map(int,input().split()))
    for i in t:
        if i==-1 or i==1:
            continue
        else:
            ans+=wlist[i][1]
print(ans)
Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = "CODEFESTIVAL2016"
ans = 0

for i in range(len(S)):
  if S[i] == T[i]:
    ans += 1

print(ans)

Failing test case input:
DDOD6101L?VJTSEF

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
T = "CODEFESTIVAL2016"
ans = 0

for i in range(len(S)):
  if S[i] != T[i]:
    ans += 1

print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = "CODEFESTIVAL2016"
c = 0
for i in range(16):
  if S[i]==T[i]:
    c += 1
print(c)

Failing test case input:
DDOD6101LAVJTSEF

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
T = "CODEFESTIVAL2016"
c = 0
for i in range(16):
  if S[i]!=T[i]:
    c += 1
print(c)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
S = "CODEFESTIVAL2016"
count = 0
for i in range(15):
    if s[i] != S[i]:
        count+=1
print(count)

Failing test case input:
0DO2KACI6REFE1TV

Expected output:
16


Actual output:
15


Fixed submission (verdict: Accepted):
s = input()
S = "CODEFESTIVAL2016"
count = 0
for i in range(16):
    if s[i] != S[i]:
        count+=1
print(count)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a="C0DEFESTIVAL2O16"
s=input()
ans=0
for i in range(len(a)):
  if a[i]!=s[i]:
    ans+=1
print(ans)

Failing test case input:
CT0EGER6IVAL2OD0

Expected output:
8


Actual output:
7


Fixed submission (verdict: Accepted):
a="CODEFESTIVAL2016"
s=input()
ans=0
for i in range(len(a)):
  if a[i]!=s[i]:
    ans+=1
print(ans)

Problem: p03970
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
t = "CODEFESTIVAL2016"
cnt = 0
for i, z in zip(s, t):
    if s != z:
        cnt += 1
        
print(cnt)

Failing test case input:
QD02CEJE1TJ>VO6D

Expected output:
15


Actual output:
16


Fixed submission (verdict: Accepted):
s = input()
t = "CODEFESTIVAL2016"
cnt = 0
for i, z in zip(s, t):
    if i != z:
        cnt += 1
        
print(cnt)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S1 = input()
S2 = "CODEFESTIVAL2016"
ans = 0
for i in range(16):
  if S1[i] == S2[i]:
    ans+=1
print(ans)
  

Failing test case input:
3DO0JACI1RFFE7WV

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
S1 = input()
S2 = "CODEFESTIVAL2016"
ans = 0
for i in range(16):
  if S1[i] != S2[i]:
    ans+=1
print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
t=list('CODEFESTIVAL2016')
count=0
for k in range(16):
    if s[k] == t[k]:
        count += 1
print(count)



Failing test case input:
VT0EGER6ICAL2OD0

Expected output:
10


Actual output:
6


Fixed submission (verdict: Accepted):
s=input()
t='CODEFESTIVAL2016'

count=0
for num in range(len(s)):
    if s[num] != t[num]:
        count += 1

print(count)
Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
A = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] == A[i]:
    ans += 1

print(ans)


Failing test case input:
D62VTJ>ODJEC10DS

Expected output:
15


Actual output:
1


Fixed submission (verdict: Accepted):
S = input()
A = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] != A[i]:
    ans += 1

print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
b='CODEFESTIVAL2016'
ans=0
for i in range(16):
  ans+=(a[i]==b[i])
print(ans)

Failing test case input:
DD016SOEL>VTK2DF

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
a=input()
b='CODEFESTIVAL2016'
ans=0
for i in range(16):
  ans+=(a[i]!=b[i])
print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(str(input().split()))
G='CODEFESTIVAL2016'
t=0
for i in range(16):
  if S[i]!=G[i]:
    t+=1
print(t)

Failing test case input:
107DFERV3CALWODI

Expected output:
12


Actual output:
15


Fixed submission (verdict: Accepted):
S=list(str(input()))
G='CODEFESTIVAL2016'
t=0
for i in range(16):
  if S[i]!=G[i]:
    t+=1
print(t)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input();print(sum("CODEFESTIVAL2016"[i]==s[i] for i in range(16)))

Failing test case input:
FD2KTV>KDOS601DE

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
s=input();print(sum("CODEFESTIVAL2016"[i]!=s[i] for i in range(16)))

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

s=input()
t='CODEFESTIVAL2016'
ans=0
for i in range(16):
    if t[i]==s[i]:ans+=1
print(ans)

Failing test case input:
VT0EGER6ICAL2OD0

Expected output:
10


Actual output:
6


Fixed submission (verdict: Accepted):

s=input()
t='CODEFESTIVAL2016'
ans=0
for i in range(16):
    if t[i]!=s[i]:ans+=1
print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
s = "CODEFESTIVAL2016"
c = 0
for i in range (15):
  if S[i]!= s[i]:
    c += 1
    
print(c)

Failing test case input:
107DFDRV3C@LWOEI

Expected output:
14


Actual output:
13


Fixed submission (verdict: Accepted):
S = input()
s = "CODEFESTIVAL2016"
c = 0
for i in range (16):
  if S[i]!= s[i]:
    c += 1
    
print(c)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] == T[i]:
    ans += 1
print(ans)

Failing test case input:
VW1EFFR7ICAJ0OD3

Expected output:
12


Actual output:
4


Fixed submission (verdict: Accepted):
S = input()
T = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] != T[i]:
    ans += 1
print(ans)
Problem: p03970
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def string_trnase(s):
    answer = 'CODEFESTIVAL2016'
    iters = 0
    s = list(s)
    for i in range(0, 16):
        if s[i] != answer[i]:
            iters += 1
    print(iters)


print('Enter a string: ')
string_trnase(input())

Failing test case input:
DD006SOEL>VTK2DF

Expected output:
16


Actual output:
Enter a string: 
16


Fixed submission (verdict: Accepted):
def string_trnase(s):
    answer = 'CODEFESTIVAL2016'
    iters = 0
    s = list(s)
    for i in range(0, 16):
        if s[i] != answer[i]:
            iters += 1
    print(iters)



string_trnase(input())

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
A = 'C0DEFESTIVAL2O16'
ans = 0
for i in range(len(S)):
  if S[i] == A[i]:
    ans += 1

print(ans)

Failing test case input:
ED01CEODJ>KTV26S

Expected output:
15


Actual output:
1


Fixed submission (verdict: Accepted):
S = input()
A = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] != A[i]:
    ans += 1

print(ans)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
count = 0;
anser = "CODEFESTIVAL2016"
for i in range(0,15):
	if not s[i] == anser[i]:
		count+=1
print(count)


Failing test case input:
FC2KTV>KDOS610DE

Expected output:
15


Actual output:
14


Fixed submission (verdict: Accepted):
s = input()
count = 0;
anser = "CODEFESTIVAL2016"
for i in range(0,16):
	if not s[i] == anser[i]:
		count+=1
print(count)

Problem: p03970
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
print(sum(s=="CODEFESTIVAL2016"[i] for i,s in enumerate(S)))

Failing test case input:
DDOC6101LAVITSEF

Expected output:
16


Actual output:
0


Fixed submission (verdict: Accepted):
S=input()
print(sum(s!="CODEFESTIVAL2016"[i] for i,s in enumerate(S)))

Problem: p03970
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
sum(a!=b for a, b in zip(s, 'CODEFESTIVAL2016'))

Failing test case input:
DD016SOEK>VTK2DF

Expected output:
16


Actual output:

Fixed submission (verdict: Accepted):
s = input()
print(sum(a!=b for a, b in zip(s, 'CODEFESTIVAL2016')))
Problem: p02730
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


S = input()

def is_kaibun(s):
    l = len(s)
    print('former', s[:int(l/2)])
    print('latter', s[:-(int(l/2))-1:-1])
    if s[:int(l/2)] == s[:-(int(l/2))-1:-1]:
        return True
    else:
        return False

if is_kaibun(S):
    if is_kaibun(S[:int((len(S)-1)/2)]):
        if is_kaibun(S[int((len(S)+3)/2)-1:]):
            print('Yes')
            exit()
print('No')

Failing test case input:
ikbs`a_

Expected output:
No


Actual output:
former ikb
latter _a`
No


Fixed submission (verdict: Accepted):

S = input()

def is_kaibun(s):
    l = len(s)
    
    
    if s[:int(l/2)] == s[:-(int(l/2))-1:-1]:
        return True
    else:
        return False

if is_kaibun(S):
    if is_kaibun(S[:int((len(S)-1)/2)]):
        if is_kaibun(S[int((len(S)+3)/2)-1:]):
            print('Yes')
            exit()
print('No')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
N = len(S)

cond_1 = S[:int((N-1)/2)]
cond_1_r = cond_1[::-1]

if cond_1 != cond_1_r:
    print('No')
    exit(0)

cond_2 = S[int((N+3)/2-1):]
cond_2_r = cond_2[::-1]

if cond_2 != cond_2_r:
    print('No')
    exit(0)

print('Yes')

Failing test case input:
llvee

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
N = len(S)

if S != S[::-1]:
    print('No')
    exit(0)


cond_1 = S[:int((N-1)/2)]
cond_1_r = cond_1[::-1]

if cond_1 != cond_1_r:
    print('No')
    exit(0)

cond_2 = S[int((N+3)/2-1):]
cond_2_r = cond_2[::-1]

if cond_2 != cond_2_r:
    print('No')
    exit(0)

print('Yes')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=str(input())
N=len(S)

S1 = S[0:int((N-1)/2)]
S2 = S[int((N+3)/2)-1:N]

if S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

Failing test case input:
ajas`k`

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S=str(input())
N=len(S)

S1 = S[0:int((N-1)/2)]
S2 = S[int((N+3)/2)-1:N]

if S==S[::-1] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(str(input()))
n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-1,N):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B):
    print('Yes')
else:
    print('No')

Failing test case input:
fpfr`ep

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(str(input()))

n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)

l = []
m = []

for i in range(N):
    l.append(s[i])
    
for i in range (M-1,n):
    m.append(s[i])
    
a = ''.join(l)
l.reverse()
A = ''.join(l)

b = ''.join(m)
m.reverse()
B = ''.join(m)

t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)

if (a==A and b==B and a == b):
    print('Yes')
else:
    print('No')
Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    s = input()
    if len(s) % 2  == 0:
        print("No")
        return
    N = int(len(s))
    
    s1 = s[0:int((N-1)/2)]
    s2 = s[int((N+1)/2):N]

    
    

    i = 0
    j = int((N - 1) / 2) - 1
    
    while True:
        if i > j:
            break
        if s1[i] != s1[j]:
            print("No")
            return
        i += 1
        j -= 1

    i = 0
    j = int((N - 1) / 2) - 1
    while True:
        if i > j:
            break
        if s2[i] != s2[j]:
            
            return
        i += 1
        j -= 1


    print("Yes")
    return


if __name__ == '__main__':
    main()

Failing test case input:
llvee

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

def main():
    s = input()
    sr = s[::-1]

    N = int(len(s))
    s1 = s[:int((N-1)/2)]
    s1r = s1[::-1]
    s2 = s[int((N+1)/2):]
    s2r = s2[::-1]

    
    
    
    
    

    for i in range(len(s)-1):
        if s[i] != sr[i]:
            print("No")
            return

    for i in range(len(s1)-1):
        if s1[i] != s1r[i]:
            print("No")
            return

    for i in range(len(s2)-1):
        if s2[i] != s2[i]:
            print("No")
            return

    print("Yes")


if __name__ == '__main__':
    main()

Problem: p02730
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    s = input()
    s1 = s[:int((len(s)-1)/2)]
    s2 = s[int((len(s)+3)/2-1):]
    rs1 = s1[::-1]
    rs2 = s2[::-1]

    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
    
    return
    
main()


Failing test case input:
`k`saja

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    s = input()
    s1 = s[:int((len(s)-1)/2)]
    s2 = s[int((len(s)+3)/2-1):]
    rs = s[::-1]
    rs1 = s1[::-1]
    rs2 = s2[::-1]


    if s1 == rs1 and s2 == rs2 and s == rs:
        print("Yes")
    else:
        print("No")
    
    return
    
main()

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
def check(s):
  return s[:int((len(s)-1)/2+1)]==s[int((len(s)-1)/2):][::-1]
if check(S) and check(S[:int((len(S)-1)/2+1)]) and check(S[int((len(S)+3)/2):]):
  print('Yes')
else:
  print('No')

Failing test case input:
akasaka

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()

def check(s):
  return s==s[::-1]

if check(S) and check(S[:int((len(S)-1)/2)]) and check(S[int((len(S)+3)/2-1):]):
  print('Yes')
else:
  print('No')
Problem: p02730
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s=list(input())
n=len(s)
zenhan=s[0:int((n-1)/2)]
kouhan=s[int((n+3)/2-1):n]
print(zenhan)
print(kouhan)
print(zenhan[::-1])
print(kouhan[::-1])
if s==s[::-1] and zenhan==zenhan[::-1] and kouhan==kouhan[::-1]:
  print('Yes')
else:
  print('No')


Failing test case input:
epfs`ep

Expected output:
No


Actual output:
['e', 'p', 'f']
['`', 'e', 'p']
['f', 'p', 'e']
['p', 'e', '`']
No


Fixed submission (verdict: Accepted):
s=list(input())
n=len(s)
zenhan=s[0:int((n-1)/2)]
kouhan=s[int((n+3)/2-1):n]
if s==s[::-1] and zenhan==zenhan[::-1] and kouhan==kouhan[::-1]:
  print('Yes')
else:
  print('No')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(str(input()))
n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-2,N-1):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B):
    print('Yes')
else:
    print('No')

Failing test case input:
fpfr_dp

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(str(input()))

n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)

l = []
m = []

for i in range(N):
    l.append(s[i])
    
for i in range (M-1,n):
    m.append(s[i])
    
a = ''.join(l)
l.reverse()
A = ''.join(l)

b = ''.join(m)
m.reverse()
B = ''.join(m)

t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)

if (a==A and b==B and a == b):
    print('Yes')
else:
    print('No')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
n = len(s)
a = int((n-1)/2)
b = int((n+3)/2)
f=0
x=s[:a]
y = s[b-1:]
if x==x[::-1] and y==y[::-1]:
  print("Yes")
else:
  print("No")

Failing test case input:
llvee

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
n = len(s)
a = int((n-1)/2)
b = int((n+3)/2)
x=s[:a]
y = s[b-1:]
if x==x[::-1] and y==y[::-1] and s==s[::-1]:
  print("Yes")
else:
  print("No")

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
N = len(S)
s1 = S[:int((N-1)/2):]
s2 = S[int(((N+3)/2)-1):int(N):]
if S == S[::-1] :
    if s1 == s1[::-1] and s2 == s2[::-1] :
        print("Yes")
    else :
          print("No")


Failing test case input:
kulec

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
S = list(input())
N = len(S)
s1 = S[:int((N-1)/2):]
s2 = S[int(((N+3)/2)-1):int(N):]
if S == S[::-1] :
    if s1 == s1[::-1] and s2 == s2[::-1] :
        print("Yes")
    else:
        print("No")
else:
    print("No")

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
n = len(S)


if S[:int((n-1)/2)] == S[:int((n-1)/2)][::-1] and S[int((n+1)/2):]== S[int((n+1)/2):][::-1]:
  print("Yes")
else:
  print("No")

Failing test case input:
`k`saja

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
n = len(S)




if S[:int((n-1)/2)] == S[:int((n-1)/2)][::-1] and S[int((n+1)/2):]== S[int((n+1)/2):][::-1] and S[:int((n-1)/2)] == S[int((n+1)/2):][::-1]:
  print("Yes")
else:
  print("No")
Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 <= p2:
        if s[p1] != s[p2]:
            flag = False
        p1 += 1
        p2 += -1
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    print(s, s1, s2)
    print(isReverse(s), isReverse(s1), isReverse(s2))
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Failing test case input:
s__`cki

Expected output:
No


Actual output:
s__`cki s__ cki
False False False
No


Fixed submission (verdict: Accepted):
def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 <= p2:
        if s[p1] != s[p2]:
            flag = False
        p1 += 1
        p2 += -1
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    
    
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
N=len(S)
i=0

if((N-1)/2%2==1):
    while (i<((N-1)/2-1)/2):
        print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/2-1)/2):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<=(N-1)/4):
        print(S[i],S[int((N-1)/2-i-1)],S[int((N-1)/2+1+i)],S[int(N-1-i)])
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==(N-1)/4):
        print('Yes')
    else:
        print('No')

Failing test case input:
derodta

Expected output:
No


Actual output:
d r d a
No


Fixed submission (verdict: Accepted):
S=input()
N=len(S)
i=0
if((N-1)/2%2==1):
    while (i<=((N-1)/2-1)/2):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int(((N-1)/2-1)/2+1)):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<=(N-1)/4):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/4+1)):
        print('Yes')
    else:
        print('No')
Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a= input()
length=math.floor(len(a)/2)
def kaibun(p):
    length_p=math.floor(len(p)/2)
    total_p = 0
    for i in range(length_p):
        if p[i] is not p[-1*i -1]:
            return False
            break
        else:
            total_p += 1
        if total_p == length_p:
            return True
if kaibun(a):
    if kaibun(a[:length+1]):
        print('Yes')
    elif length==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')



Failing test case input:
akasaka

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import math
a= input()
length=math.floor(len(a)/2)
def kaibun(p):
    length_p=math.floor(len(p)/2)
    total_p = 0
    for i in range(length_p):
        if p[i] is not p[-1*i -1]:
            return False
            break
        else:
            total_p += 1
        if total_p == length_p:
            return True
if kaibun(a):
    if kaibun(a[:length]):
        print('Yes')
    elif length==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()

def judge_palindrome(x):
	
	flag=True
	if len(x)%2==0:
		flag=False
	for i in range(int((len(x)-1)/2)):
		if x[i]!=x[len(x)-1-i]:
			flag=False
	if flag:
		return True
	else:
		return False

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Failing test case input:
akasaka

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s=input()

def judge_palindrome(x):
	if x==x[::-1]:
		return True
	else:
		return False

if judge_palindrome(s)==True and judge_palindrome(s[:int((len(s)-1)/2)])==True and judge_palindrome(s[int((len(s)+3)/2)-1:])==True:
	print('Yes')
else:
	print('No')
Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse
kai2.reverse
kai3.reverse

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])
  
if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


Failing test case input:
pe`sepd

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse()
kai2.reverse()
kai3.reverse()

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB = S[-SF_num:]
SB_rev = SB[::-1]

if SF == SB_rev:
    if SF[:SF_num] == SF_rev[:SF_num]:
        if SB[-SF_num:] == SB_rev[-SF_num:]:
            print("Yes")
else:
    print("No")

Failing test case input:
level

Expected output:
No

Actual output:

Fixed submission (verdict: Accepted):
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB_num = int((N+3)/2)
SB = S[SB_num-1:]
SB_rev = SB[::-1]

if SF == SB_rev and SF == SF_rev and SB == SB_rev:
    print("Yes")
else:
    print("No")

Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    a = input()
    a_len = len(a)
    
    top_s = a[:int((a_len-1)/2)]
    tail_s = a[int((a_len+3)/2)-1:]
    if top_s == ''.join(list(reversed(top_s))) and tail_s == ''.join(list(reversed(tail_s))):
        print('Yes')
    else:
        print('No')

Failing test case input:
llvee

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    a = input()
    a_len = len(a)
    
    top_s = a[:int((a_len-1)/2)]
    tail_s = a[int((a_len+3)/2)-1:]
    if a ==  ''.join(list(reversed(a))) and top_s == ''.join(list(reversed(top_s))) and tail_s == ''.join(list(reversed(tail_s))):
        print('Yes')
    else:
        print('No')
Problem: p02730
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = list(input())
nr = list(reversed(n))
mae = []
usiro = []
for i in range(int((len(n)-1)/2)):
    mae.append(n[i])
    usiro.append(nr[i])

if mae == usiro:
    print('Yes')
else:
    print('No')


Failing test case input:
elvle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(input())

mae = []
usiro = []
for i in range(int((len(n)-1)/2)):
    mae.append(n[i])
for i in range(int((len(n)+3)/2)-1,len(n)):
    usiro.append(n[i])

if mae == usiro:
    print('Yes')
else:
    print('No')
Problem: p03952
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, x = map(int, readline().split())
    ans = [0] * (2 * n - 1)

    if x == 1 or x == (2 * n - 1):
        print(-1)
        return

    for i in range(1, n + 1):
        if i % 2 == 1:
            ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
        else:
            ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1
    ans[n] = x

    for i in range(n + 1, 2 * n):
        if i % 2 == 0:
            ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
        else:
            ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1

    print(*ans, sep="\n")


if __name__ == '__main__':
    main()


Failing test case input:
173 1

Expected output:
No


Actual output:
-1


Fixed submission (verdict: Accepted):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, x = map(int, readline().split())
    ans = [0] * (2 * n - 1)

    if x == 1 or x == (2 * n - 1):
        print("No")
        return

    for i in range(1, n + 1):
        if i % 2 == 1:
            ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
        else:
            ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1
    ans[n] = x

    for i in range(n + 1, 2 * n):
        if i % 2 == 0:
            ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
        else:
            ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1
    
    print("Yes")
    print(*ans, sep="\n")


if __name__ == '__main__':
    main()
Problem: p03952
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,x = map(int,input().split())
if N in {1,2*N-1}:print("No")
else:
    print("Yes")
    if x>=N:
        ans = list(range(N,x))+list(range(x+1,2*N)) + [x] + list(range(1,N))
    else:
        ans = list(range(N+1,2*N)) + [x] + list(range(1,x)) + list(range(x+1,N+1))
    print("\n".join(map(str,ans)))

Failing test case input:
173 1

Expected output:
No


Actual output:
Yes
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173


Fixed submission (verdict: Accepted):
N,x = map(int,input().split())
if x in {1,2*N-1}:print("No")
else:
    print("Yes")
    if x>=N:
        ans = list(range(N,x))+list(range(x+1,2*N)) + [x] + list(range(1,N))
    else:
        ans = list(range(N+1,2*N)) + [x] + list(range(1,x)) + list(range(x+1,N+1))
    print("\n".join(map(str,ans)))
Problem: p03952
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,x=map(int,input().split())
if x==1 or x==2*N-1:
    print(-1)
    exit()
if N==2:
    print('Yes')
    print(*[1,2,3],sep='\n')
    exit()
s=set(range(1,2*N))
s.remove(x)
ans=[0]*(2*N-1)
ans[N-1]=x
min1=min(s)
max1=max(s)
s.remove(min1);s.remove(max1)
if x==2*N-2:
    min2=min(s)
    s.remove(min2)
    ans[N-2]=min1;ans[N]=max1;ans[N+1]=min2
else:
    max2=max(s)
    s.remove(max2)
    ans[N-2]=max1;ans[N]=min1;ans[N+1]=max2
li=list(s)
for i in range(2*N-1):
    if ans[i]==0:
        ans[i]=li.pop()
print("Yes")
print(*ans,sep='\n')

Failing test case input:
173 1

Expected output:
No


Actual output:
-1


Fixed submission (verdict: Accepted):
N,x=map(int,input().split())
if x==1 or x==2*N-1:
    print("No")
    exit()
if N==2:
    print('Yes')
    print(*[1,2,3],sep='\n')
    exit()
s=set(range(1,2*N))
s.remove(x)
ans=[0]*(2*N-1)
ans[N-1]=x
min1=min(s)
max1=max(s)
s.remove(min1);s.remove(max1)
if x==2*N-2:
    min2=min(s)
    s.remove(min2)
    ans[N-2]=min1;ans[N]=max1;ans[N+1]=min2
else:
    max2=max(s)
    s.remove(max2)
    ans[N-2]=max1;ans[N]=min1;ans[N+1]=max2
li=list(s)
for i in range(2*N-1):
    if ans[i]==0:
        ans[i]=li.pop()
print("Yes")
print(*ans,sep='\n')

Problem: p03952
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, x = [int(i) for i in input().split()]
import sys

if x == 1 or x == 2*N-1:
    if N != 1:
        print(-1)
        sys.exit()
    else:
        print(1)
        sys.exit()

smaller = True
if x > N:
    smaller = False
    x = 2*N-x

ans = list(range(2*N-1,N+x-1,-1))+list(range(1,N+x))
if not smaller:
    ans =[2*N - ans[i] for i in range(2*N-1)]

print(*ans)

Failing test case input:
157 1

Expected output:
No


Actual output:
-1


Fixed submission (verdict: Accepted):
N, x = [int(i) for i in input().split()]
import sys

if x == 1 or x == 2*N-1:
    if N != 1:
        print('No')
        sys.exit()
    else:
        print('Yes')
        print(1)
        sys.exit()

smaller = True
if x > N:
    smaller = False
    x = 2*N-x

ans = list(range(2*N-1,N+x-1,-1))+list(range(1,N+x))
if not smaller:
    ans =[2*N - ans[i] for i in range(2*N-1)]

print('Yes')
for i in range(2*N-1):
    print(ans[i])