Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
 
def main(N, S):
    total = N
    for i in range(N):
        total = min(total, S[:i].count("W") + S[i+1:].count("E"))
    print(total)
    
if(__name__ == "__main__"):
    N = int(input())
    S = input()
    
    main(N, S)

Fixed submission:
# -*- coding: utf-8 -*-
 
def main(N, S):
    num_e = S.count("E")
    num_w = 0
    res = num_e
    for s in S:
        if(s=="E"):
            num_e -= 1
        else:
            num_w += 1
        res = min(res, num_e + num_w)
    print(res)
    
if(__name__ == "__main__"):
    N = int(input())
    S = input()
    
    main(N, S)
Buggy python submission (verdict: Runtime Error):
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(0<=i+dy[k]<H and 0<=j+dx[k]<W and S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
if(exist==True):
    print("Yes")

Fixed submission:
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(0<=i+dy[k]<H and 0<=j+dx[k]<W and S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
print("Yes")

Buggy python submission (verdict: Runtime Error):
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(not 0<=i+dy[k]<H or not 0<=j+dx[k]<W):
                continue
            if(S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
if(exist==True):
    print("Yes")

Fixed submission:
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(0<=i+dy[k]<H and 0<=j+dx[k]<W and S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
print("Yes")

Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]


for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(not 0<=i+dy[k]<H or not 0<=j+dx[k]<W):
                continue
            if(S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            break
            
if(exist==True):
    print("Yes")

Fixed submission:
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(0<=i+dy[k]<H and 0<=j+dx[k]<W and S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

def main(N,C,S,F):
    ans = [0]*N
    for i in range(N-2):
        tmp = S[i]+C[i]
        for j in range(i+1,N-1):
            if tmp<S[j]:
                tmp = S[j]
            elif tmp>S[j] and (tmp-S[j])%F[j]!=0:
                part = F[j]
                while(1):
                    part += F[j]
                    if part>=tmp:
                        tmp = part
                        break
            
            tmp += C[j]
        ans[i] = tmp
    ans[-2] = C[-1]+S[-1]
    
    for i in ans:
        print(i)

if __name__ == '__main__':
    N = int(input())
    C,S,F = [],[],[]
    for i in range(N-1):
        c,s,f = map(int, input().split())
        C.append(c)
        S.append(s)
        F.append(f)
    main(N,C,S,F)

Fixed submission:
# -*- coding: utf-8 -*-

import math

def main(N,C,S,F):
    ans = [0]*N
    for i in range(N-2):
        tmp = S[i]+C[i]
        for j in range(i+1,N-1):
            if tmp<S[j]:
                tmp = S[j]
            elif tmp>S[j] and (tmp-S[j])%F[j]!=0:
                part = math.ceil((tmp-S[j])/F[j])
                tmp = S[j]+F[j]*part
            tmp += C[j]
        ans[i] = tmp
    ans[-2] = C[-1]+S[-1]
    
    for i in ans:
        print(i)

if __name__ == '__main__':
    N = int(input())
    C,S,F = [],[],[]
    for i in range(N-1):
        c,s,f = map(int, input().split())
        C.append(c)
        S.append(s)
        F.append(f)
    main(N,C,S,F)
Buggy python submission (verdict: Runtime Error):
def main(S_,T):

    for i in range(len(S_)-len(T)+1):
        cnt = 0
        idx = -1
        for j in range(len(T)):
            if(S_[i+j]==T[j] or S_[i+j]=="?"):
                cnt += 1
                if cnt == len(T):
                    idx = i+j-len(T)+1
                else:
                    continue
            else:
                break
                
    if idx == -1:
        print("UNRESTORABLE")
    else:
        for i in range(len(T)):
            S_[idx+i] = T[i]
        for i in range(len(S_)):
            if S_[i] == "?":
                S_[i] = "a"
        print("".join(S_))

if __name__ == '__main__':
    S_ = list(input())
    T = list(input())
    main(S_,T)

Fixed submission:
# -*- coding: utf-8 -*-

def main(S_,T):
    for i in range(len(S_)-len(T)+1):
        for j in range(len(T)):
            if S_[i+j]!="?" and T[j]!=S_[i+j]:break
        else:
            print(''.join(list(reversed((S_[:i]+T+S_[i+j+1:]).replace("?","a")))))
            exit()
    print("UNRESTORABLE")

if __name__ == '__main__':
    S_ = "".join(list(reversed(input())))
    T = "".join(list(reversed(input())))
    main(S_,T)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

def lcm(a,b):
    return (a * b) // math.gcd(a, b)

def main(N,T):
    ans = 1
    for t in T:
        ans = lcm(ans, t)
        
    print(ans)

if __name__ == '__main__':
    N = int(input())
    T = []
    for i in range(N):
        T.append(int(input()))
    main(N,T)

Fixed submission:
# -*- coding: utf-8 -*-

def gcd(a,b):
    if(b==0):
        return a
    return gcd(b, a%b)

def lcm(a,b):
    return (a * b)//gcd(a, b)

def main(N,T):
    ans = 1
    for t in T:
        ans = lcm(ans, t)
        
    print(ans)

if __name__ == '__main__':
    N = int(input())
    T = []
    for i in range(N):
        T.append(int(input()))
    main(N,T)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def main(N,A):
    zenbu = sum(A)
    part_sum = [A[0]]
    ans = float("INF")
    for i in range(1,N): 
        print(part_sum,zenbu-part_sum[-1])
        ans = min(ans, abs(zenbu-2*part_sum[-1]))
        part_sum.append(part_sum[-1]+A[i])

    print(ans)
    
if __name__ == '__main__':
    N = int(input())
    A = [int(a) for a in input().split()]
    main(N,A)

Fixed submission:
# -*- coding: utf-8 -*-

def main(N,A):
    zenbu = sum(A)
    part_sum = [A[0]]
    ans = float("INF")
    for i in range(1,N): 
        ans = min(ans, abs(zenbu-2*part_sum[-1]))
        part_sum.append(part_sum[-1]+A[i])

    print(ans)
    
if __name__ == '__main__':
    N = int(input())
    A = [int(a) for a in input().split()]
    main(N,A)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

def main(N,A):
    zenbu = sum(A)
    ans = float("INF")
    for i in range(1,N):
        part_sum = 0
        part_sum = sum(A[:i])
        ans = min(ans, abs(zenbu-2*part_sum))
    print(ans)
    
if __name__ == '__main__':
    N = int(input())
    A = [int(a) for a in input().split()]
    main(N,A)

Fixed submission:
# -*- coding: utf-8 -*-

def main(N,A):
    zenbu = sum(A)
    part_sum = [A[0]]
    ans = float("INF")
    for i in range(1,N): 
        ans = min(ans, abs(zenbu-2*part_sum[-1]))
        part_sum.append(part_sum[-1]+A[i])

    print(ans)
    
if __name__ == '__main__':
    N = int(input())
    A = [int(a) for a in input().split()]
    main(N,A)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

def main(N,K,A,B):
    while(0<K):
        tmp = min(A)
        idx = A.index(min(A))
        K -= B[idx]
        A.pop(idx)
        B.pop(idx)
    print(tmp)
    
if __name__ == '__main__':
    N, K = map(int, input().split())
    A, B = [], []
    for i in range(N):
        a, b = map(int, input().split())
        A.append(a)
        B.append(b)
    main(N,K,A,B)

Fixed submission:
# -*- coding: utf-8 -*-

def main(N,K,A):
    A = sorted(A, key=lambda x:x[0])
    tmp = A[0][0]
    for a, b in A:
        tmp = a
        if(0<K-b):
            K -= b
        else:
            print(tmp)
            break
    
if __name__ == '__main__':
    N, K = map(int, input().split())
    A = [[int(i) for i in input().split()] for i in range(N)]
    main(N,K,A)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def solve(N, M, A, B):
    
    include = False
    for h in range(N-M+1):
        for w in range(N-M+1):
            match = True
            for i in range(M):
                for j in range(M):
                    if(A[h+i][w+j] != B[i][j]):
                        match = False
            if(match):
                include = True
    
    print("Yes" if include else "No")
    
    
if __name__ == '__main__':
    N, M = map(int, input().split())
    A, B = [], []
    for i in range(N):
        A.append(input())
    for j in range(M):
        B.append(input())

    solve(N, M, A, B

Fixed submission:
# -*- coding: utf-8 -*-

def solve(N, M, A, B):
    include = False
    for h in range(N-M+1):
        for w in range(N-M+1):
            match = True
            for i in range(M):
                for j in range(M):
                    if(A[h+i][w+j] != B[i][j]):
                        match = False
            if(match):
                include = True

    print("Yes" if include else "No")

if __name__ == '__main__':
    N, M = map(int, input().split())
    A, B = [], []
    for i in range(N):
        A.append(input())
    for j in range(M):
        B.append(input())

    solve(N, M, A, B)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def solve(H, W, C):
    for i in range(2*H):
        for j in C[i]:
            print(j)
            print(j)
        

if __name__ == '__main__':
    H, W = map(int, input().split())
    C = [[input()] for i in range(H)]
  
    solve(H, W, C)

Fixed submission:
# -*- coding: utf-8 -*-

def solve(H, W, C):
    for i in range(H):
        for j in list(C[i]):
            print(j)
            print(j)
        
if __name__ == '__main__':
    H, W = map(int, input().split())
    C = [[input()] for i in range(H)]
  
    solve(H, W, C)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
sum = 0
count = 0

while(sum<=b):
    if(a<=sum):
        count += 1
    sum += x
        
print(count)

Fixed submission:
a, b, x = map(int, input().split())

print((b//x) -((a-1)//x))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def solve(a, b, h):
    print(int((a+b)*h/2)

if __name__ == '__main__':
    a  = int(input())
    b = int(input())
    h = int(input())

    solve(a, b, h)

Fixed submission:
# -*- coding: utf-8 -*-

def solve(a, b, h):
    print(int((a+b)*h/2))

if __name__ == '__main__':
    a  = int(input())
    b = int(input())
    h = int(input())

    solve(a, b, h)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

def solve(S):
    A = []
    for i in range(len(S)):
        if(S[i]=="0" or S[i]=="1"):
            A.append(S[i])
        else:
            A.pop()
    print("".join(A))
    
if __name__ == '__main__':
    S = input()
    
    solve(S)

Fixed submission:
# -*- coding: utf-8 -*-

def solve(S):
    A = []
    for i in range(len(S)):
        if(S[i]=="0" or S[i]=="1"):
            A.append(S[i])
        elif(len(A)>0 and S[i]=="B"):
            A.pop()
    print("".join(A))
    
if __name__ == '__main__':
    S = input()
    
    solve(S)
Buggy python submission (verdict: Runtime Error):
k = input("整数kを入力してください")
a = input("整数aを入力してください")
b = input("整数bを入力してください")
c = int(a)
d = int(b)
l = int(k)
e = d-d%l
if e>=c:
    print('ok')
else:
    print('ng')

Fixed submission:
k=input()
a,b=input().split()
c=int(a)
d=int(b)
l=int(k)
e=d-d%l
if e>=c:
  print('OK')
else:
  print('NG')
Buggy python submission (verdict: Runtime Error):
nk = list(input().split())
n = nk[0]
k = nk[1]
a = []
c = 0
for i in range(k):
  d = int(input())
  b = list(input().split())
  a.extend(b)
for j in range(1,n+1):
  if j not in a:
    c = c+1
print(c)

Fixed submission:
nk = list(input().split())
n = nk[0]
k = nk[1]
a = []
c = 0
for i in range(int(k)):
  d = int(input())
  b = list(input().split())
  a.extend(b)
for j in range(1,int(n)+1):
  if str(j) not in a:
    c = c+1
print(c)

Buggy python submission (verdict: Runtime Error):
nk = list(input().split())
n = nk[0]
k = nk[1]
a = []
for i in range(1,k+1):
  d = int(input())
  b = list(input().split())
  a.entend(b)
c = 0
for j in range(1,n+1):
  if j not in a:
    c = c+1
print(c)
  

Fixed submission:
nk = list(input().split())
n = nk[0]
k = nk[1]
a = []
c = 0
for i in range(int(k)):
  d = int(input())
  b = list(input().split())
  a.extend(b)
for j in range(1,int(n)+1):
  if str(j) not in a:
    c = c+1
print(c)
Buggy python submission (verdict: Runtime Error):
x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(0, 100):
        b = a-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])

Fixed submission:
x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(0, 1000):
        b = a-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])

Buggy python submission (verdict: Runtime Error):
x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(2, 100):
        b = 2-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])

Fixed submission:
x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(0, 1000):
        b = a-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = input().split(' ')

fl = "YES"
for i, a in enumerate(A):
  if a in A[i+1:]:
    fl = "NO"
    break

print(fl)

Fixed submission:
n = int(input())
A = input().split(' ')

if len(A) == len(set(A)):
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [i for i in input().split(' ')] 

fl = "YES"
for i, a in enumerate(A):
  if a in A[i+1:]:
    fl = "NO"
    break

print(fl)


Fixed submission:
n = int(input())
A = input().split(' ')

if len(A) == len(set(A)):
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [int(i) for i in input().split(' ')] 

ls = [x for x in set(A) if A.count(x) > 1]

if len(ls)==0:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
A = input().split(' ')

if len(A) == len(set(A)):
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [int(i) for i in input().split(' ')] 

fl = "YES"
for i, a in enumerate(A):
  if a in A[i+1:]:
    fl = "NO"
    break

print(fl)

Fixed submission:
n = int(input())
A = input().split(' ')

if len(A) == len(set(A)):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = [int(i) for i in input().split(' ')]
P = [int(i) for i in input().split(' ')]

ans_ind = max([sum(P[i:i+k]) for i in range(n - (k-1))])

print((ans_ind + k) * 0.5)

Fixed submission:
n, k = [int(i) for i in input().split(' ')]
P = [int(i) for i in input().split(' ')]

temp = sum(P[:k])
res = temp
for i in range(n- k):
  temp -= P[i]
  temp += P[i+k]
  res = max(res, temp)
  
ans = (res + k) * 0.5

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = [int(i) for i in input().split(' ')]
P = [int(i) for i in input().split(' ')]

ans_ind = max([sum(P[i:i+k]) for i in range(len(P)-(k-1))])
ans = (ans_ind + k) * 0.5

print(ans)

Fixed submission:
n, k = [int(i) for i in input().split(' ')]
P = [int(i) for i in input().split(' ')]

temp = sum(P[:k])
res = temp
for i in range(n- k):
  temp -= P[i]
  temp += P[i+k]
  res = max(res, temp)
  
ans = (res + k) * 0.5

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
h = np.array([int(i) for i in input().split()])

d = np.diff(h)
dd = np.array([d[i]+d[i+1] for i in range(len(d)-1)])

if n == 1:
  print('Yes')
elif (d>=-1) and (dd>=-1).all():
  print('Yes')
else:
  print('No')

Fixed submission:
import numpy as np

n = int(input())
h = np.array([int(i) for i in input().split()])

err = 0
f = 0
for i in range(n-1):
  t = h[i+1] - h[i]
  if t>=-1 and f>=-1 and not(t==-1 and f==-1):
    pass
  else:
    err = 1
    break
    
  if t!=0:
    f = t
  
if err==1:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
import numpy as np
s = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
        if len(str(divisors[-1]))<=9:
            break
    raise ValueError("error!")
    return divisors

tmp = int(np.ceil(np.sqrt(s)))
tmp2 = tmp*(tmp) - s
if tmp2<=1:
    tmp2 = tmp*(tmp+1) - s
    y3 = tmp + 1
else:
    y3 = tmp
div = make_divisors(tmp2)[-2:]

x1 = 0
y1 = 0
x2 = tmp
y2 = div[0]
try:
    x3 = div[1]
except:
    x3 = div[0]
    
print(x1, y1, x2, y2, x3, y3)

Fixed submission:
import numpy as np
s = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
        if len(str(divisors[-1]))<=9:
            break
    return divisors

if s != 1000000000000000000:
    tmp = int(np.ceil(np.sqrt(s)))
    tmp2 = tmp*(tmp) - s
    if tmp2<=1:
        tmp2 = tmp*(tmp+1) - s
        y3 = tmp +1
    else:
        y3 = tmp
    div = make_divisors(tmp2)[-2:]

    x1 = 0
    y1 = 0
    x2 = tmp
    y2 = div[0]
    try:
        x3 = div[1]
    except:
        x3 = div[0]
    if x2==x3 and y2==y3:
        dummy = y2
        y2 = x3
        x3 = dummy
else:
    x1, y1, x2, y2, x3, y3 = 0, 0, 0, 1000000000, 1000000000, 0
    
print(x1, y1, x2, y2, x3, y3)

Buggy python submission (verdict: Runtime Error):
import numpy as np
s = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
        if len(str(divisors[-1]))<=9:
            break
    return divisors

tmp = int(np.ceil(np.sqrt(s)))
tmp2 = tmp*(tmp) - s
if tmp2<=1:
    tmp2 = tmp*(tmp+1) - s
    y3 = tmp +1
else:
    y3 = tmp
div = make_divisors(tmp2)[-2:]

x1 = 0
y1 = 0
x2 = tmp
y2 = div[0]
x3 = div[1]

print(x1, y1, x2, y2, x3, y3)

Fixed submission:
import numpy as np
s = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
        if len(str(divisors[-1]))<=9:
            break
    return divisors

if s != 1000000000000000000:
    tmp = int(np.ceil(np.sqrt(s)))
    tmp2 = tmp*(tmp) - s
    if tmp2<=1:
        tmp2 = tmp*(tmp+1) - s
        y3 = tmp +1
    else:
        y3 = tmp
    div = make_divisors(tmp2)[-2:]

    x1 = 0
    y1 = 0
    x2 = tmp
    y2 = div[0]
    try:
        x3 = div[1]
    except:
        x3 = div[0]
    if x2==x3 and y2==y3:
        dummy = y2
        y2 = x3
        x3 = dummy
else:
    x1, y1, x2, y2, x3, y3 = 0, 0, 0, 1000000000, 1000000000, 0
    
print(x1, y1, x2, y2, x3, y3)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))

ls = []
for i in range(n):
  x = A[0]
  for j, a in enumerate(A[1:]):
    if j%2==0:
      x -= a
    else:
      x += a
  A.insert(n, A[0])
  A.pop(0)
  print(x)

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

x = A[0]
for j, a in enumerate(A[1:]):
    if j%2==0:
      x -= a
    else:
      x += a
print(x)
for i in A[:-1]:
  x = 2*(i-x/2)
  print(int(x))
Buggy python submission (verdict: Runtime Error):
n = int(input()) 
X = [[int(i) for i in input().split()] for i in range(n)] 

from collections import Counter
def cal_diff(x1, x2):
    return (x1[0] - x2[0], x1[1] - x2[1])

hoge = [cal_diff(x1, x2) for x1 in X for x2 in X if x1 != x2]
minus = Counter(hoge).most_common(1)[0][1]
ans = n - minus
print(ans)


Fixed submission:
n = int(input()) 
X = [[int(i) for i in input().split()] for i in range(n)] 

from collections import Counter
def cal_diff(x1, x2):
    return (x1[0] - x2[0], x1[1] - x2[1])

if n != 1:
  hoge = [cal_diff(x1, x2) for x1 in X for x2 in X if x1 != x2]
  minus = Counter(hoge).most_common(1)[0][1]
  ans = n - minus
  print(ans)
elif n == 1:
  print(1)