Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())

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

# list内の最も大きい数字を2で割るのをm回行う
for i in range(m):
    a = sorted(a)
    a[n -1] = int(a[n -1] / 2)

print(sum(a))

Fixed submission:
import heapq

n, m = map(int, input().split())

a = [-int(a) for a in input().split()]
heapq.heapify(a)

for i in range(m):
    heapq.heappush(a, int(heapq.heappop(a) / 2))

print(sum(a) * -1)
Buggy python submission (verdict: Runtime Error):
n = int(input())

h = list(map(int, input().split()))

ans = []
result = 0

for x in range(n - 1):
    if h[x] >= h[x + 1] :
        result += 1
        ans.append(result)
    else :
        ans.append(result)
        result = 0

print(max(ans))


Fixed submission:
n = int(input())

h = list(map(int, input().split()))

ans = 0
result = 0

for x in range(n - 1):
    if h[x] >= h[x + 1] :
        result += 1
    else :
        ans = max(ans, result)
        result = 0
ans = max(ans, result)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [sorted(input()) for _ in range(n)]
ans = 0

for i in range(n):
	for k in range(n):
		if s[i] == s[k] :
			ans += 1

print(int((ans - n) / 2))

Fixed submission:
n = int(input())
s = ["".join(sorted(input())) for _ in range(n)]
ans = 0
s_dic = {i:0 for i in s}

for j in range(n):
	if s[j] in s_dic :
		s_dic[s[j]] += 1

print(sum(s_dic[k] * (s_dic[k] - 1) // 2 for k in s_dic))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]
ans = 0

for i in range(n):
	for k in range(n):
		if sorted(s[i]) == sorted(s[k]) :
			ans += 1

print(int((ans - n) / 2))


Fixed submission:
n = int(input())
s = ["".join(sorted(input())) for _ in range(n)]
ans = 0
s_dic = {i:0 for i in s}

for j in range(n):
	if s[j] in s_dic :
		s_dic[s[j]] += 1

print(sum(s_dic[k] * (s_dic[k] - 1) // 2 for k in s_dic))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
b = sorted(a)

for A in a:
    if A == b[n - 1]:
        print(b[n - 2])
    else:
        print(b[n - 1])


Fixed submission:
r = int(input())

print(3 * r * r)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
b = sorted(a)

for A in a:
    if A == b[n - 1]:
        print(b[n - 2])
    else:
        print(b[n - 1])

Fixed submission:
r = int(input())

print(3 * r * r)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for i in range(n)]

for i in range(n):
    b = a[:]
    del b[i]
    print(max(b))


Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
b = sorted(a)

for A in a:
    if A == b[n - 1]:
        print(b[n - 2])
    else:
        print(b[n - 1])
Buggy python submission (verdict: Runtime Error):
num = input()
if num % 2 == 0:
  print(num/2);
else:
  print(num+1/2);

Fixed submission:
str = input()
num = int(str)
print('%d' % (num/2)) if num % 2 == 0 else print('%d' % ((num+1)/2))
Buggy python submission (verdict: Runtime Error):

v = []
m = [False for _ in range(9)]
for i in range(3):
    a, b, c = map(int, input().split())
    v += [a, b, c]

n = int(input())
for i in range(n):
    a = int(input())
    if a in v:
        m[v.index(a)] = True

def control():
    for i in range(3):
        if all(m[3*i:3*i+3]):
            return True
        if all(m[i::3]):
            return True

    if all(m[::4]) or all(m[2:8:2]):
        return True
    return False

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

Fixed submission:


n, m = map(int, input().split())

digits = {i: None for i in range(n)}
def main():
    string = ""
    for i in range(m):
        s, c = map(int, input().split())
        if digits[s-1] is not None and digits[s-1] != c:
            return -1
        digits[s-1] = c

    if n==1 and m==0:
        return 0

    for i, d in digits.items():
        if d is not None:
            if i==0 and d == 0:
                if n==1:
                    return 0
                return -1
            string += str(d)
        else:
            if i==0:
                string+= "1"
            else:
                string += "0"
    return int(string)

print(main())
Buggy python submission (verdict: Runtime Error):
    n = int(input())
    l = list(map(int, input().split()))
    def test():
      for i in l:
        if i%2 != 0 and i%3!=0 and i%5!=0:
          return "DENIED"
      return "APPROVED"
    print(test())

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
def test():
  for i in l:
    if i%2 == 0 and i%3!=0 and i%5!=0:
      return "DENIED"
  return "APPROVED"
print(test())
Buggy python submission (verdict: Runtime Error):
n = int(input())
m = {}
for i in n:
  s = input()
  if s in m:
    m[s] += 1
  else:
    m[s] = 1
    
maxim = max(m.values())
mySet = set(key if value == maxim for key, value in m.items())
for i in mySet:
  print(i)
  

Fixed submission:
n = int(input())
m = {}
for i in range(n):
    s = input()
    if s in m:
        m[s] += 1
    else:
        m[s] = 1

maxim = max(m.values())
mySet = set(key for key, value in m.items() if value == maxim)
for i in sorted(mySet):
    print(i)
Buggy python submission (verdict: Runtime Error):
    b = input().split()
    a = list(map(int, input().split()))
    c = {b[i]:a[i] for i in range(len(b))}
    print(c[input()] - 1)

Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
i = input()
if t == i:
  print(a, b-1)
else:
  print(a-1, b)

Buggy python submission (verdict: Runtime Error):
b = input().split()
a = map(int, input().split())
c = {b[i]:a[i] for i in range(len(b))}
print(c[input()] - 1)


Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
i = input()
if t == i:
  print(a, b-1)
else:
  print(a-1, b)
Buggy python submission (verdict: Time Limit Exceeded):


a, b = map(int, input().split())
MOD = (1e9 + 7)

def calc(x, y):
    right = above = 0
    while x>0 and y>0:
        if x>y:
            x -= 2
            y -= 1
            right += 1
        else:
            x -= 1
            y -= 2
            above += 1

    return (True, right, above) if x==0 and y==0 else (False, None, None)


def res(n, k):
    # print(n, k)
    total = 1
    if k < n-k:
        k = n-k
    for i in range(k+1, n+1):
        total = (total * i)# % MOD
    d = 1
    for i in range(1, n-k+1):
        d = (d*i) #% MOD
    return total // d

r, right, above = calc(a, b)
if not r:
    print(0)
else:
    print(int(res(above+right, right) % MOD))


Fixed submission:


a, b = map(int, input().split())
MOD = int(1e9 + 7)

def calc(x, y):
    right = above = 0
    while x>0 and y>0:
        if x>y:
            x -= 2
            y -= 1
            right += 1
        else:
            x -= 1
            y -= 2
            above += 1

    return (True, right, above) if x==0 and y==0 else (False, None, None)


def res(n, k):
    # print(n, k)
    total = 1
    if k < n-k:
        k = n-k
    for i in range(k+1, n+1):
        total = (total * i)% MOD
        total *= pow(i-k, MOD-2, MOD)
    return total

r, right, above = calc(a, b)
if not r:
    print(0)
else:
    print(int(res(above+right, right) % MOD))
Buggy python submission (verdict: Time Limit Exceeded):


n, t = map(int, input().split())
time = []
ratio = []
delic = []
v = []
used = [False for i in range(n)]
for i in range(n):
    x, y = map(int, input().split())
    v.append((x, y))
    time.append((x, y))
    delic.append((y, x, i))
    ratio.append((y/x, x, y, i))


time.sort()

dp = [[0, 0] for i in range(t)]


for i in range(n):
    ti, d = time[i]
    for j in range(t-1, -1, -1):
        if j+ti < t:
            dp[j+ti][0] = max(dp[j+ti][0], dp[j][0]+d)
            dp[j+ti][1] = max(dp[j+ti][1], dp[j][1]+d)
        dp[j][1] = max(dp[j][1], dp[j][0]+d)

print(dp[t-1][1])

Fixed submission:
# https://codeforces.com/blog/entry/71482
# https://atcoder.jp/contests/abc145/submissions/8473167

import numpy
n, t = map(int, input().split())
time = []
for i in range(n):
    x, y = map(int, input().split())
    time.append((x, y))


dp = numpy.zeros(t, dtype=int)
time.sort()
ans = 0
for a, b in time:
    ans = max(ans, dp[-1]+b)
    dp[a:] = numpy.maximum(dp[a:], dp[:-a]+b)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections

N = int(input())
S = [input() for i in range(N)]

setted_S = set(S)
counted_S = collections.Counter(S)

ans_ls = []
for k, v in counted_S.items():
    if v == max(counted_S.values()):
        ans_ls.append(k)

ans_ls.sort()

for i in ans_ls:
    print(i)

Fixed submission:
import collections

N = int(input())
S = [input() for i in range(N)]

setted_S = set(S)
counted_S = collections.Counter(S)
sorted_S = sorted(counted_S.items(), key=lambda x: x[1], reverse=True)

ans_ls = []
for s in sorted_S:
    a = sorted_S[0][1]
    if s[1] == a:
        ans_ls.append(s[0])
    else:
        break

ans_ls.sort()

for i in ans_ls:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

lis = []

for _ in range(M):
    i, j = input().split()
    i = int(i)
    lis.append((i, j))


cnt_AC = []
cntsAC = 0

inc = [i for i in range(1, N + 1)]
zeros = [0 for _ in range(N)]

flags = dict(zip(inc, zeros))
flags_forWA = dict(zip(inc, zeros))

cntsWA = 0

for k, v in lis:
    if k not in cnt_AC:
        if v == "AC":
            cnt_AC.append(k)
            cntsAC += 1
            flags[k] = 1
        else:
            cnt_AC.append(k)
    else:
        if v == "AC" and flags[k] == 0:
            cntsAC += 1
            flags[k] = 1


for k, v in lis:
    if flags[k] == 1 and v == "WA" and flags_forWA[k] == 0:
        cntsWA += 1
    elif v == "AC":
        flags_forWA[k] = 1

print(cntsAC, cntsWA, sep=" ")

Fixed submission:
N, M = map(int, input().split())

lis = []

for _ in range(M):
    i, j = input().split()
    i = int(i)
    lis.append((i, j))


cntsAC = 0

inc = [i for i in range(1, N + 1)]
zeros = [0 for _ in range(N)]

flags = dict(zip(inc, zeros))
flags_forAC = dict(zip(inc, zeros))
flags_forWA = dict(zip(inc, zeros))

cntsWA = 0

for k, v in lis:
    if flags_forAC[k] == 0:
        if v == "AC":
            flags_forAC[k] = 1
            cntsAC += 1
            flags[k] = 1
        else:
            flags_forAC[k] = 1
    else:
        if v == "AC" and flags[k] == 0:
            cntsAC += 1
            flags[k] = 1


for k, v in lis:
    if flags[k] == 1 and v == "WA" and flags_forWA[k] == 0:
        cntsWA += 1
    elif v == "AC":
        flags_forWA[k] = 1

print(cntsAC, cntsWA, sep=" ")
Buggy python submission (verdict: Runtime Error):
import random

S = list(input())
n = len(S)
reS = list(reversed(S))

diffeNum_list = []
alphabets = [chr(ord("a") + i) for i in range(26)]
countLi = []

if S == reS:
    print(0)
else:
    for i in range(n):
        if S[i] != reS[i]:
            diffeNum_list.append(i)

    def hantei(S):
        count = 0
        for i in diffeNum_list:
            tempNum = random.choice(alphabets)
            if S[i] != tempNum:
                S[i] = tempNum
                count += 1

            if S == reS:
                countLi.append(count)

    for i in range(10000):
        hantei(S)

    print(min(countLi))

Fixed submission:
s = list(input())

cnt = 0

for i in range(int(len(s) / 2)):
    if s[i] != s[-(i + 1)]:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]

points = [K for _ in range(N)]

for i in range(Q):
    points[A[i] - 1] += 1
    for j in range(N):
        points[j] -= 1

for j in range(N):
    if points[j] >= 1:
        print("Yes")
    else:
        print("No")


Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]

points = [K for _ in range(N)]

for i in range(Q):
    points[A[i] - 1] += 1

for j in range(N):
    points[j] -= Q

for j in range(N):
    if points[j] >= 1:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int, input().split()))

dp = [float("inf") for i in range(n)]
dp[0] = 0

for i in range(n - 1):
    for j in range(1, k + 1):
        try:
            dp[i + j] = min(dp[i + j], dp[i] + abs(h[i + j] - h[i]))
        except IndexError:
            pass

print(dp[n - 1])



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

dp = [float("inf") for i in range(n)]
dp[0] = 0

for i in range(n - 1):
    for j in range(1, k + 1):
        try:
            dp[i + j] = min(dp[i + j], dp[i] + abs(h[i + j] - h[i]))
        except IndexError:
            pass

print(dp[n - 1])
Buggy python submission (verdict: Runtime Error):
k ,x = map(int,input().split)

if k*500 >= x:
  print('Yes')
else:
  print('No')

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

if k*500 >= x:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
base = 10

if n%2 != 0:
  print(0)
else:
  ans = 0
  for i in range(10000)
    ans += n//base
    base *= 5   
  print(ans)
  

Fixed submission:
a = int(input())
b = int(input())
 
print(6-a-b)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
 
s = 1
t = 0
 
for i in range(n):
    if s == a[i]:
        s += 1
    else:
        t += 1
if t == n:
    t = -1
print(t)

Fixed submission:
a = int(input())
b = int(input())
 
print(6-a-b)

Buggy python submission (verdict: Runtime Error):
n = int(input())
 
a = list(map(int,input().split()))
 
s = 1
t = 0
 
for i in range(n):
   if s == a[i]:
      s += 1
   else:
      t +=1
      
if t != n:
  print(t)
else:
  print(-1)

Fixed submission:
a = int(input())
b = int(input())
 
print(6-a-b)

Buggy python submission (verdict: Runtime Error):
import math
 
a,b = map(int,input().split())
 
x = math.gcd(a,b)
 
print(a*b//x)

Fixed submission:
a = int(input())
b = int(input())
 
print(6-a-b)
Buggy python submission (verdict: Runtime Error):
n = int(input)
s, t= map(str,input().split())

l = ' '

for i in range(n)
  l += s[i]
  l += t[i]

  print(l)


Fixed submission:
n = int(input())
s,t = input().split()
l = ''
for i in range(n):
    l += s[i]
    l += t[i]
print(l)
Buggy python submission (verdict: Runtime Error):
import math

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

x = math.gcd(a,b)

s = -(-a//x)
t = -(-b//x)

if a >= b:
  print(s)
else:
  print(t)

Fixed submission:
from fractions import gcd
a,b = map(int, input().split())
print((a*b) // gcd(a,b))
Buggy python submission (verdict: Runtime Error):
n = int(input())
 
a = list(map(int,input().split()))
 
s = 1
t = 0
 
for i in range(n):
 if s == a[i]:
      s += 1
   else:
      t +=1
      
if t != n:
  print(t)
else:
  print(-1)

Fixed submission:
n = int(input())
renga = list(map(int,input().split()))
 
next = 1
ans = 0
 
for i in range(n):
    if next == renga[i]:
        next += 1
    else:
        ans += 1
if ans == n:
    ans = -1
print(ans)

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

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

s = 1
t = 0

for i in range(n):
	if s == a[i]:
      s += 1
    else:
      t +=1
      
if t != n:
  print(t)
else:
  print(-1)
  

Fixed submission:
n = int(input())
renga = list(map(int,input().split()))
 
next = 1
ans = 0
 
for i in range(n):
    if next == renga[i]:
        next += 1
    else:
        ans += 1
if ans == n:
    ans = -1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
base = 10
ans = 0
 
if n%2 == 1:
  print(0)
else:
  for i in range(1,100):
    ans += n//base    base *= 5   
  print(ans

Fixed submission:
n = int(input())
base = 10
ans = 0
 
if n%2 == 1:
  print(0)
else:
  for i in range(1,100):
    ans += n//base    
    base *= 5   
  print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
base = 10
ans = 0
if n%2 != 0:
  print(0)
else:
  for i in range(1,10000)
    ans += n//base
    base *= 5   
  print(ans)

Fixed submission:
n = int(input())
base = 10
ans = 0
 
if n%2 == 1:
  print(0)
else:
  for i in range(1,100):
    ans += n//base    
    base *= 5   
  print(ans)

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

if n%2 != 0:
  print(0)
else:
  ans = 0
  while n > 0:
    n //= 5
    ans += n//2
print(ans)
  

Fixed submission:
n = int(input())
base = 10
ans = 0
 
if n%2 == 1:
  print(0)
else:
  for i in range(1,100):
    ans += n//base    
    base *= 5   
  print(ans)
Buggy python submission (verdict: Runtime Error):
a1, a2, a3 = map(int, input(), split())
 
if a1 + a2 + a3 >= 22:
  print("bust")
else:
  print("win")

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a1, a2, a3 = map(int, input(), split())

if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a1 = input()
a2 = input()
a3 = input()
a = a1 + a2 + a3

if a >= 22:
  print('bust')
else:
  print('win')

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a1 = int(input())
a2 = int(input())
a3 = int(input())
 
A = a1 + a2 + a3
 
if A >= 22:
  print('bust')
else:
   print('win')

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a1 = int(input())
a2 = int(input())
a3 = int(input())
 
A = a1 + a2 + a3
 
if A >= 22:
  print('bust')
 else:
    print('win')

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a1 = int(input())
a2 = int(input())
a3 = int(input())

A = a1 + a2 + a3

if A >= 22:
  print('bust')
  else:
    print('win')
    

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
 
A = a + b+ c
 
if A >= 22:
 print('bust')
  else:
  print('win')

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
a = int(input());
b = int(input());
c = int(input());

A = a + b+ c;

if A >= 22
 print('bust');
  else
  print('win');

Fixed submission:
a1, a2, a3 = map(int, input().split())
 
if a1 + a2 + a3 >= 22:
  print('bust')
else:
  print('win')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
num = ['a'] * N
for i in range(M):
    s, c = map(int, input().split())
    if num[s-1] == 'a':
        num[s-1] = str(c)
    elif num[s-1] == str(c):
        continue
    else:
        num.append('B')

if M == 0 and N != 1:
    num[0] = 1
elif M == 0 and N == 1:
    num[0] = 0
elif num[0] == 'a' and M != 0:
    num[0] = '1'

for i in range(1,N):
    if num[i] == 'a':
        num[i] = '0'

if num[-1] == 'B':
    print(-1)
elif N == 1:
    print(''.join(num) if num[-1] != 'B' else -1)
elif num[0] == '0':
    print(-1)
else:
    print(''.join(num) if num[-1] != 'B' else -1)

Fixed submission:
import sys
N,M = map(int, input().split())
num = ['B'] * N
for _ in range(M):
    s,c = map(int, input().split())
    if num[s-1] != 'B' and num[s-1] != c:
        num.append('No')
    else:
        num[s-1] = c

if N == 1 and num[0] == 'B':
    num[0] = 0
    
if N > 1 and num[0] == 'B':
    num[0] = 1

if 'No' in num:
    print(-1)
    sys.exit()
elif N > 1 and num[0] == 0:
    print(-1)
    sys.exit()
    
for i in range(1,N):
    if num[i] == 'B':
        num[i] = 0

for i in range(N):
    num[i] = str(num[i])

print(''.join(num))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
num = ['a'] * N
for i in range(M):
    s, c = map(int, input().split())
    if num[s-1] == 'a':
        num[s-1] = str(c)
    elif num[s-1] == str(c):
        continue
    else:
        num.append('B')

if M == 0 and N != 1:
    num[0] = 1
elif M == 0 and N == 1:
    num[0] = 0
if num[0] == 'a' and M != 0:
    num[0] = '1'

for i in range(1,N):
    if num[i] == 'a':
        num[i] = '0'

if num[-1] == 'B':
    print(-1)
elif N == 1:
    print(''.join(num) if num[-1] != 'B' else -1)
elif num[0] == '0':
    print(-1)
else:
    print(''.join(num) if num[-1] != 'B' else -1)

Fixed submission:
import sys
N,M = map(int, input().split())
num = ['B'] * N
for _ in range(M):
    s,c = map(int, input().split())
    if num[s-1] != 'B' and num[s-1] != c:
        num.append('No')
    else:
        num[s-1] = c

if N == 1 and num[0] == 'B':
    num[0] = 0
    
if N > 1 and num[0] == 'B':
    num[0] = 1

if 'No' in num:
    print(-1)
    sys.exit()
elif N > 1 and num[0] == 0:
    print(-1)
    sys.exit()
    
for i in range(1,N):
    if num[i] == 'B':
        num[i] = 0

for i in range(N):
    num[i] = str(num[i])

print(''.join(num))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = []
for i in input().split():
    if i in lst:
        print('NO')
        break
    else:
        lst.append(i)
        
if len(lst) == N:
    print('YES')

Fixed submission:
N = int(input())
U = set()
for i in input().split():
    U.add(i)
print('YES' if len(U) == N else 'NO')

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = [x for x in input().split()]
a = ''

for i in range(N):
    a = lst.pop()
    if a in lst:
        print('NO')
        break
    else:
        continue

if len(lst) == 0:
    print('YES')

Fixed submission:
N = int(input())
U = set()
for i in input().split():
    U.add(i)
print('YES' if len(U) == N else 'NO')
Buggy python submission (verdict: Runtime Error):
h = int(input())
a = int(input())
counter = 0

while h > 0:
    h -= a
    counter += 1
    
print(counter)

Fixed submission:
h,a = map(int, input().split())
counter = 0

while h > 0:
    h -= a
    counter += 1
    
print(counter)
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = 0
minnum = 200001
counter = 0

for i in range(N):
  p = int(input())
  if p < minnum:
    counter += 1
    minnum = p

print(counter)
  

Fixed submission:
N = int(input())
lst_p = list(map(int,input().split()))

counter = 0
min_num = 1000000

for i in range(N):
    if lst_p[i] <= min_num:
        counter += 1
        min_num = lst_p[i]
    else:
        continue
print(counter)
Buggy python submission (verdict: Runtime Error):
lst = imput().split()
if int(lst[0]) >= 3200:
  print(lst[1])
else:
  print('red')

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print('red')

Buggy python submission (verdict: Runtime Error):
a,s = input().split()
if a >= 3200:
  print(s)
else:
  print('red')

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print('red')
Buggy python submission (verdict: Runtime Error):
N = int(input())
lst_A = [1/int(input()) for i in range(N)]
#print('lst_A:', lst_A)
print(1/sum(lst_A))

Fixed submission:
n = input()
lst_A = map(int, input().split())
lst_A_inv = [1/x for x in lst_A]
print(1/sum(lst_A_inv))

Buggy python submission (verdict: Runtime Error):
#Resistors in Parallel
N = int(input())
lst_A = [1/int(input()) for i in range(N)]

print(1/sum(lst_A))

Fixed submission:
n = input()
lst_A = map(int, input().split())
lst_A_inv = [1/x for x in lst_A]
print(1/sum(lst_A_inv))

Buggy python submission (verdict: Runtime Error):
N = input()
lst_A = [1/int(input()) for i in range(N)]

print(1/sum(lst_A))

Fixed submission:
n = input()
lst_A = map(int, input().split())
lst_A_inv = [1/x for x in lst_A]
print(1/sum(lst_A_inv))
Buggy python submission (verdict: Runtime Error):
N = input()
if N == '1':
    print('Hello World')
A,B = [int(input()) for _ in range(2)]
print(A+B)

Fixed submission:
N = input()
if N == '1':
    print('Hello World')
else:
    A,B = [int(input()) for _ in range(2)]
    print(A+B)