Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
listh = list(map(int, input().split()))
#print(listh)
lista = [0]
count = 0
for n in range(1,N):
    if listh[n] > listh[n-1]:
        count = 0
        lista.append(count)
    else:
        count = count + 1
        lista.append(count) 
print(max(lista))        
        

Fixed submission:
N = int(input())
listh = list(map(int, input().split()))
#print(listh)
lista = [0]
count = 0
for n in range(1,N):
    if listh[n] > listh[n-1]:
        count = 0
        lista.append(count)
    else:
        count = count + 1
        lista.append(count) 
#print(lista)        
print(max(lista))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
listh = list(map(int, input().split()))
#print(listh)
lista = []
count = -1
rem = 0
for n in range(N):
    hi = listh[n]
    if rem >= hi:
        lista.append(count)
        rem = hi
    else:
        count = count + 1
        lista.append(count) 
        rem = hi
#print(lista)  
A = lista[N-1]
listans = []
for a in range(A+1):
    ans = lista.count(a)
    listans.append(ans)    
#print(listans)    
ans = max(listans)
print(ans-1)


Fixed submission:
N = int(input())
listh = list(map(int, input().split()))
#print(listh)
lista = [0]
count = 0
for n in range(1,N):
    if listh[n] > listh[n-1]:
        count = 0
        lista.append(count)
    else:
        count = count + 1
        lista.append(count) 
#print(lista)        
print(max(lista))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
an = 0
an1 = 1 
for n in range(N):
    if n+1 in lista:
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)    


Fixed submission:
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista.append(am)
lista.append(0)    
an = 0
an1 = 1 
for n in range(N):
    if n+1 == lista[0]:
        del lista[0]
        #print(lista)
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
listans = [0]*N 
an = 0
an1 = 1 
for n in range(N):
    if n+1 in lista:
        an, an1 = an1, 0
    else:
        an, an1 = an1, an+an1
print(an1%1000000007)        


Fixed submission:
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista.append(am)
lista.append(0)    
an = 0
an1 = 1 
for n in range(N):
    if n+1 == lista[0]:
        del lista[0]
        #print(lista)
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
listans = [0]*N 
for n in range(N):
    if n+1 in lista:
        pass
    elif n == 0:
        listans[0] = 1
    elif n == 1:
        listans[1] = listans[0]+1
    else:
        listans[n] = (listans[n-1]+listans[n-2])%1000000007    
#print(listans)       
ans = listans[N-1] 
print(ans)

Fixed submission:
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista.append(am)
lista.append(0)    
an = 0
an1 = 1 
for n in range(N):
    if n+1 == lista[0]:
        del lista[0]
        #print(lista)
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
listans = [0]*N 
for n in range(N):
    if n+1 in lista:
        pass
    elif n == 0:
        listans[0] = 1
    elif n == 1:
        listans[1] = listans[0]+1
    else:
        listans[n] = listans[n-1]+listans[n-2]    
#print(listans)       
ans = listans[N-1]%1000000007 
print(ans)

Fixed submission:
N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista.append(am)
lista.append(0)    
an = 0
an1 = 1 
for n in range(N):
    if n+1 == lista[0]:
        del lista[0]
        #print(lista)
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lista = sorted(list(map(int, input().split())))
length = len(lista)
while length>1:
    #print(length)
    #print(lista)
    for n in range(1, length):
        lista[n] = lista[n]%lista[0]
    #print(lista)
    lista.sort()
    #print(lista)
    lista = list(set(lista))
    if lista[0] == 0:
        lista.remove(0)
    #print(lista)
    length = len(lista)
print(lista[0])  

Fixed submission:
N = int(input())
lista = sorted(list(map(int, input().split())))
length = 2
while length>1:
    #print(length)
    #print(lista)
    for n in range(1, length):
        lista[n] = lista[n]%lista[0]
    #print(lista)
    lista = list(set(lista))
    lista.sort()
    if lista[0] == 0:
        lista.remove(0)
    #print(lista)
    length = len(lista)
print(lista[0])
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import functions
F = sys.stdin

N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))

num = 1
while a_list[0] % 2**(num + 1) == 0:
    num += 1
def lcm(a, b):
    return (a * b) // functions.gcd(a, b)

lcm_before = 1
for a in a_list:
    if (a/(2**num)) % 2 != 1:
        print(0)
        sys.exit()

    lcm_before = lcm(lcm_before, a//2)



ans1 = M // lcm_before
ans = (ans1 + 1) // 2
print(ans)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import fractions
F = sys.stdin

N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))

num = 1
while a_list[0] % 2**(num + 1) == 0:
    num += 1
def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)

lcm_before = 1
for a in a_list:
    if (a/(2**num)) % 2 != 1:
        print(0)
        sys.exit()

    lcm_before = lcm(lcm_before, a//2)



ans1 = M // lcm_before
ans = (ans1 + 1) // 2
print(ans)

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin

N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))

num = 1
while a_list[0] % 2**(num + 1) == 0:
    num += 1
def lcm(a, b):
    return (a * b) // math.gcd(a, b)

lcm_before = 1
for a in a_list:
    if (a/(2**num)) % 2 != 1:
        print(0)
        sys.exit()

    lcm_before = lcm(lcm_before, a//2)



ans1 = M // lcm_before
ans = (ans1 + 1) // 2
print(ans)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import fractions
F = sys.stdin

N, M = list(map(int,F.readline().rstrip().split()))
a_list = list(map(int,F.readline().rstrip().split()))

num = 1
while a_list[0] % 2**(num + 1) == 0:
    num += 1
def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)

lcm_before = 1
for a in a_list:
    if (a/(2**num)) % 2 != 1:
        print(0)
        sys.exit()

    lcm_before = lcm(lcm_before, a//2)



ans1 = M // lcm_before
ans = (ans1 + 1) // 2
print(ans)
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin
a, b, x = F.readline().rstrip().split()
a = int(a)
b = int(b)
x = int(x)
h = x / (a**2)
h2 = x/a
y = a * b / 2


if h2 <= y:
    c = 2*h2/b
    ans = math.degrees(math.atan(c/b))
    print(90 - ans)

if h2 > y:
    c = (2*h2/a) - b
    ans = math.degrees(math.atan(a/(b-c)))
    print(90 - ans)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin
N = int(F.readline())
sqN = int(math.sqrt(N))
ans = 0

for i in range(1, sqN+1):
    if N % i == 0:
        A = int(i - 1)
        B = int((N / i) - 1)
        if ans == 0 or A + B < ans:
            ans = A + B

print(ans)
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin

D, G = map(int,F.readline().split())
p = []
c = []
all_score = []
maisu = 0
ans = 0
sum = 0
all_selected = [0]*D
for k in range(D):
    p1, c1 = map(int,F.readline().split())
    p.append(p1)
    c.append(c1)
    all_score.append(100 * k * p1 + c1)

for bit in range(1<<D):
    for i in range(D):
        if bit & (1<<i):
            all_selected[i] = 1
            sum += all_score[i]
            maisu += p[i]

    nokori = G - sum
    if nokori <= 0:
        if ans == 0:
            ans = maisu
        else:
            ans = min(ans, maisu)
        continue
    for j in range(D)[::-1]:
        if all_selected[j] == 0:
            nokorimaisu = (nokori // (100 * j)) + 1
            if nokorimaisu <= p[j]:
                maisu += nokorimaisu
                if ans == 0:
                    ans = maisu
                else:
                    ans = min(ans, maisu)
            break



    all_selected = [0]*D
    maisu = 0
    sum = 0

print(ans)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin

D, G = map(int,F.readline().split())
p = []
c = []
all_score = []
maisu = 0
ans = 0
sum = 0
all_selected = [0]*D
for k in range(D):
    p1, c1 = map(int,F.readline().split())
    p.append(p1)
    c.append(c1)
    all_score.append(100 * (k+1) * p1 + c1)

for bit in range(1<<D):
    for i in range(D):
        if bit & (1<<i):
            all_selected[i] = 1
            sum += all_score[i]
            maisu += p[i]

    nokori = G - sum
    if nokori <= 0:
        if ans == 0:
            ans = maisu
        else:
            ans = min(ans, maisu)
        all_selected = [0]*D
        maisu = 0
        sum = 0
        continue

    for j in range(D)[::-1]:
        if all_selected[j] == 0:
            nokorimaisu = math.ceil(nokori / (100 * (j+1)))
            if nokorimaisu <= p[j]:
                maisu += nokorimaisu
                if ans == 0:
                    ans = maisu
                else:
                    ans = min(ans, maisu)
            break

    all_selected = [0]*D
    maisu = 0
    sum = 0

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
K, S = map(int,F.readline().split())
count = 0
for x in range(K+1):
    yplusz = S - x
    for y in range(yplusz+1):
        z = yplusz - y
        if z <= K and y <= K:
            count += 1

print(count)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
K, S = map(int,F.readline().split())
count = 0
for x in range(K+1):
    yplusz = S - x
    for y in range(yplusz+1):
        z = yplusz - y
        if z <= K and y <= K:
            count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
N, L = int(F.readline().rstrip().split())
a = [F.readline() for x in range(N)]

a.sort()
answer = ''.join(a)
print(answer)


Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
N, L = F.readline().rstrip().split()
N = int(N)
L = int(L)
a = [F.readline().rstrip() for x in range(N)]

a.sort()
answer = ''.join(a)
print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
T = []
L = []
for i in range(0,N):
    S = str(input())
    L.append(S)

T.append([L[0],1])  
for i in range(1,N):
    for j in range(0,len(T)):
        if L[i] == T[j][0]:
            T[j][1] += 1
            break
        elif j == len(T)-1:
            T.append([L[i],1])

Max = 0
for i in range(0,len(T)):
    if T[i][1] > Max:
        Max = T[i][1]

ans = []
for i in range(0,len(T)):
    if T[i][1] == Max:
        ans.append(T[i][0])

ans = sorted(ans)

for i in range(0,len(ans)):
    print(ans[i])

Fixed submission:
N = int(input())
T = []
L = []
for i in range(0,N):
    S = str(input())
    L.append(S)

L = sorted(L)
k = 0
T.append([L[0],1])  
for i in range(1,N):
    for j in range(k,len(T)):
        if L[i] == T[j][0]:
            T[j][1] += 1
        else:
            k = j + 1
            T.append([L[i],1])
            break

Max = 0
for i in range(0,len(T)):
    if T[i][1] > Max:
        Max = T[i][1]

ans = []
for i in range(0,len(T)):
    if T[i][1] == Max:
        ans.append(T[i][0])

ans = sorted(ans)

for i in range(0,len(ans)):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
count = 0
for i in range(0,N):
    for j in range(0,i+1):
        if P[i] > P[j]:
            break
        if j == i:
            count += 1
print(count)

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
count = 0
min = P[0]
for i in range(0,N):
    if P[i] <= min:
        min = P[i]
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
 
mes_dict = {}
for i in range(N):
  m = input()
  try:
    mes_dict[m] += 1
  except:
    mes_dict[m] = 1

answer = sorted([k for k, v in mes_dict.items() if v == max(mes_dict.values())])
for ans in answer:
  print(ans)

Fixed submission:
N = int(input())
 
mes_dict = {}
for i in range(N):
  m = input()
  try:
    mes_dict[m] += 1
  except:
    mes_dict[m] = 1

ma =max(mes_dict.values())
answer = sorted([k for k, v in mes_dict.items() if v == ma])
for ans in answer:
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

mes_dict = {}
for i in range(N):
  m = input()
  if m not in mes_dict:
    mes_dict[m] = 0
  mes_dict[m] += 1

answer = sorted([k for k, v in mes_dict.items() if v == max(mes_dict.values())])
for ans in answer:
  print(ans)

Fixed submission:
N = int(input())
 
mes_dict = {}
for i in range(N):
  m = input()
  try:
    mes_dict[m] += 1
  except:
    mes_dict[m] = 1

ma =max(mes_dict.values())
answer = sorted([k for k, v in mes_dict.items() if v == ma])
for ans in answer:
  print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = input().split()
 
a_list = [int(i) for i in a]

a_list_index = [a_list.index(i+1) + 1 for i in range(N)]

print(' '.join(map(str, a_list_index)))

Fixed submission:
N = int(input())
a = input().split()
 
#a_list = [int(i) for i in a]
#a_list_index = [a_list.index(i+1) + 1 for i in range(N)]
#print(' '.join(map(str, a_list_index)))

new_list =[0] * N
for i , b in enumerate(a):
  new_list[int(b)-1] = i + 1
print(' '.join(map(str, new_list)))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = input().split()

a_list = [int(i) for i in a]

for i in range(N):
    print(a_list.index(i+1) + 1,end=' ')

Fixed submission:
N = int(input())
a = input().split()
 
#a_list = [int(i) for i in a]
#a_list_index = [a_list.index(i+1) + 1 for i in range(N)]
#print(' '.join(map(str, a_list_index)))

new_list =[0] * N
for i , b in enumerate(a):
  new_list[int(b)-1] = i + 1
print(' '.join(map(str, new_list)))
Buggy python submission (verdict: Time Limit Exceeded):
def cf(x1,x2):
    cf=[]
    for i in range(2,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf
  
A, B = input().split()
 
A = int(A)
B = int(B)

cf_list = cf(A, B)


so_list = [1]
for i in cf_list:
  count = 0
  for so in so_list:
    
    if cf(i, so) == []:
      count +=1
  if count == len(so_list):
    so_list.append(i)

      
print(len(so_list))

Fixed submission:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
  
A, B = input().split()
 
A = int(A)
B = int(B)

gcd_num =gcd(A,B)

gcd_list = factorization(gcd_num)

t = len(gcd_list)
if gcd_list == [[1, 1]]:
  print(t)
else:
  print(t+1)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = input().split()
N=int(N)
K=int(K)
Q=int(Q)

seikai_list = []
for i in range(Q):
  seikai_list.append(int(input()))

for n in range(N):
  point = seikai_list.count(n+1) + K - Q
  if point > 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
N,K,Q = input().split()
N=int(N)
K=int(K)
Q=int(Q)

seikai_list = [K - Q] * N
for i in range(Q):
  num = int(input()) -1
  seikai_list[num] = seikai_list[num] +1

for n in seikai_list:
  if n > 0:
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = input().split()
N=int(N)
K=int(K)
Q=int(Q)

seikai_list = []
for i in range(Q):
  seikai_list.append(int(input()))
  
count_list = []
for n in range(N):
  count_list.append(seikai_list.count(n+1))

count_list2 = map(lambda x: x + K - Q, count_list)

for count in count_list2:
  if count > 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
N,K,Q = input().split()
N=int(N)
K=int(K)
Q=int(Q)

seikai_list = [K - Q] * N
for i in range(Q):
  num = int(input()) -1
  seikai_list[num] = seikai_list[num] +1

for n in seikai_list:
  if n > 0:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
price_list = list(map(int, price_list))
 
for _ in range(M):
  num = max(price_list)
  price_list.remove(num)
  price_list.append(int(num/2))
print(sum(price_list))

Fixed submission:
import heapq

N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
heap_list = []
for i in price_list:
  heapq.heappush(heap_list, int(i) * (-1))

for _ in range(M):
  max_num = heapq.heappop(heap_list)
  heapq.heappush(heap_list, int(max_num /2))
  
print(sum(heap_list) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
price_list = list(map(int, price_list))
 
for m in range(M):
  price_list.sort(reverse=True)
  price_list[0] = int(price_list[0] / 2)
print(sum(price_list))

Fixed submission:
import heapq

N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
heap_list = []
for i in price_list:
  heapq.heappush(heap_list, int(i) * (-1))

for _ in range(M):
  max_num = heapq.heappop(heap_list)
  heapq.heappush(heap_list, int(max_num /2))
  
print(sum(heap_list) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
price_list = [int(i) for i in price_list]
 
for m in range(M):
  price_list.sort(reverse=True)
  price_list[0] = int(price_list[0] / 2)
print(sum(price_list))

Fixed submission:
import heapq

N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
heap_list = []
for i in price_list:
  heapq.heappush(heap_list, int(i) * (-1))

for _ in range(M):
  max_num = heapq.heappop(heap_list)
  heapq.heappush(heap_list, int(max_num /2))
  
print(sum(heap_list) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()

price_list = [int(i) for i in price_list]
 
for m in range(M):
  max_num = price_list.index(max(price_list))
  price_list[max_num] = int(price_list[max_num] / 2)
print(sum(price_list))

Fixed submission:
import heapq

N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
heap_list = []
for i in price_list:
  heapq.heappush(heap_list, int(i) * (-1))

for _ in range(M):
  max_num = heapq.heappop(heap_list)
  heapq.heappush(heap_list, int(max_num /2))
  
print(sum(heap_list) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
for i in range(N):
  price_list[i] = int(price_list[i])

for m in range(M):
  max_num = price_list.index(max(price_list))
  price_list[max_num] = int(price_list[max_num] / 2)
print(sum(price_list))

Fixed submission:
import heapq

N,M = input().split()
N = int(N)
M = int(M)
price_list = input().split()
 
heap_list = []
for i in price_list:
  heapq.heappush(heap_list, int(i) * (-1))

for _ in range(M):
  max_num = heapq.heappop(heap_list)
  heapq.heappush(heap_list, int(max_num /2))
  
print(sum(heap_list) * (-1))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import numpy as np

N = input()
input_line = input()
Ai = input_line.split(" ")
NumAi = np.array(Ai)
Comment = "YES"
N = int(N)
for i in range(N):
  for j in range(i+1,N):
    if(NumAi[i] == NumAi[j]):
      Comment = "NO"
      break
      
print(Comment)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

N = input()
input_line = input()
Ai = input_line.split(" ")
NumAi = np.array(Ai)
Comment = "NO"
N = int(N)
if(len(NumAi) == len(np.unique(NumAi))):
  Comment = "YES"

#if(NumAi != set)
      
print(Comment)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = input()
input_line = input()
Ai = input_line.split(" ")
Comment = "YES"
N = int(N)
for i in range(N):
  for j in range(i+1,N):
    if(Ai[i] == Ai[j]):
      Comment = "NO"
      break
      
print(Comment)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

N = input()
input_line = input()
Ai = input_line.split(" ")
NumAi = np.array(Ai)
Comment = "NO"
N = int(N)
if(len(NumAi) == len(np.unique(NumAi))):
  Comment = "YES"

#if(NumAi != set)
      
print(Comment)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = input()
input_line = input()
Ai = input_line.split(" ")
Comment = "YES"
for i in range(int(N)):
  for j in range(i+1,int(N)):
    if(Ai[i] == Ai[j]):
      Comment = "NO"
      break
      
print(Comment)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

N = input()
input_line = input()
Ai = input_line.split(" ")
NumAi = np.array(Ai)
Comment = "NO"
N = int(N)
if(len(NumAi) == len(np.unique(NumAi))):
  Comment = "YES"

#if(NumAi != set)
      
print(Comment)
Buggy python submission (verdict: Runtime Error):
read = input 
rn = lambda :list(map(int, read().split()))
# O(N^2)
n, k = rn()
V = rn() # 0 ~ n-1
best = 0
for i in range(0, n + 1): # [0, n]
    for j in range(i + 1, n+1): # [i + 1, n]
        # take [0,i), [j, n)
        yes = V[0:i] + V[j: n]
        if len(yes) > k:
            continue
        leftout = k - len(yes)
        yes.sort()
        for skip in range(len(yes)):
            if yes[skip] <0 and leftout > 0:
                leftout -= 1
            else :
                break
        if best < sum(yes[skip:]):
#             print(yes[skip:], k)
            best = sum(yes[skip:])
print(best)

Fixed submission:
read = input 
rn = lambda :list(map(int, read().split()))
# O(N^2)
n, k = rn()
V = rn() # 0 ~ n-1
best = 0
for i in range(0, n + 1): # [0, n]
    for j in range(i, n+1): # [i + 1, n]
        # take [0,i), [j, n)
        yes = V[0:i] + V[j: n]
        if len(yes) > k:
            continue
        leftout = k - len(yes)
        yes.sort()
        skip = 0
        for skip in range(len(yes)):
            if yes[skip] <0 and leftout > 0:
                leftout -= 1
            else :
                break
        if best < sum(yes[skip:]):
            best = sum(yes[skip:])
#             print(yes[skip:], k, best)
print(best)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, read().split())
s = read()
k -= 1
s= s[:k] + str.lower(s[k]) + s[k+1:]
print(s)

Fixed submission:
read = input
n, k = map(int, read().split())
s = read()
k -= 1
s= s[:k] + str.lower(s[k]) + s[k+1:]
print(s)