Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
def mapinput():
    return map(int,input().split())

n,m = mapinput()
rootlist = set()
delist = []
flag = [False for i in range(n)]
for i in range(m):
    rootlist.add(tuple(mapinput()))

que = [1]
while len(que) != 0:
    for root in rootlist:
        temp = list(root)
        if que[0] in temp:
            for i in [j for j in root if j != que[0]]:
                if flag[i-1]:
                    break
                else:
                    flag[i-1] = que[0]
                    que.append(i)
                    delist.append(root)

    for root in delist:
        rootlist.remove(root)
    delist = []
    que.pop(0)


print('Yes')
for i,root in enumerate(flag):#スライスで実装
    if i == 0:
        continue
    print(root)


Fixed submission:
from collections import deque

def mapinput():
    return map(int,input().split())

n,m = mapinput()
rootlist = [[] for i in range(n)]
flag = [False for i in range(n)]

for i in range(m):
    a,b= mapinput()
    rootlist[a-1].append(b)
    rootlist[b-1].append(a)

que = deque()
que.append(1)
while len(que) !=0:
    now = que.popleft()
    for room in rootlist[now-1]:
        if flag[room-1] == False:
            flag[room-1] = now
            que.append(room)

print('Yes')
for i,root in enumerate(flag):#スライスで実装
    if i == 0:
        continue
    print(root)

Buggy python submission (verdict: Time Limit Exceeded):
def mapinput():
    return map(int,input().split())

n,m = mapinput()
rootlist = []
delist = []
flag = [False for i in range(n)]
for i in range(m):
    rootlist.append(list(mapinput()))

que = [1]
while len(que) != 0:
    for root in rootlist:
        if que[0] in root:
            for i in [j for j in root if j != que[0]]:
                if flag[i-1]:
                    break
                else:
                    flag[i-1] = que[0]
                    que.append(i)

    for root in delist:
        rootlist.remove(root)
    delist = []
    que.pop(0)


print('Yes')
for i,root in enumerate(flag):
    if i == 0:
        continue
    print(root)


Fixed submission:
from collections import deque

def mapinput():
    return map(int,input().split())

n,m = mapinput()
rootlist = [[] for i in range(n)]
flag = [False for i in range(n)]

for i in range(m):
    a,b= mapinput()
    rootlist[a-1].append(b)
    rootlist[b-1].append(a)

que = deque()
que.append(1)
while len(que) !=0:
    now = que.popleft()
    for room in rootlist[now-1]:
        if flag[room-1] == False:
            flag[room-1] = now
            que.append(room)

print('Yes')
for i,root in enumerate(flag):#スライスで実装
    if i == 0:
        continue
    print(root)
Buggy python submission (verdict: Runtime Error):
n , k = map(int,input().split())
steps = list(map(int,input().split()))
dp = []

def frog(list,n,max):
    global dp

    if n == 0:
        dp.append(0)
    else:
        global k
        temp = 10000
        for i in range(k):
            if n == i:
                break
            jump = abs(list[n]-list[n-(i+1)])+dp[n-(i+1)]
            if jump <= temp:
                temp = jump
        dp.append(temp)
for i in range(n):
    frog(steps,i,n)
print(dp[n-1])


Fixed submission:
n = int(input())
steps = list(map(int,input().split()))
dp = []

def frog(list,n,max):
    global dp
    if n == 0:
        dp.append(0)
    else:
        temp1 = abs(list[n] - list[n-1]) + dp[n-1]

        if n == 1:
            dp.append(temp1)
        else:
            temp2 = abs(list[n] - list[n-2]) + dp[n-2]
            if temp1 >= temp2:
                dp.append(temp2)
            else:
                dp.append(temp1)
for i in range(n):
    frog(steps,i,n)
print(dp[n-1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
steps = list(map(int,input().split()))
dp = []

def frog(list,n,max):
    global dp
    if n == 0:
        dp.append(0)
        frog(list,1,max)
    else:
        temp1 = abs(list[n] - list[n-1]) + dp[n-1]

        if n == 1:
            dp.append(temp1)
            if n != max - 1:
                frog(list,2,max)
        else:
            temp2 = abs(list[n] - list[n-2]) + dp[n-2]
            if temp1 >= temp2:
                dp.append(temp2)
            else:
                dp.append(temp1)
            if n != max - 1:
                frog(list,n+1,max)

frog(steps,0,n)
print(dp[n-1])


Fixed submission:
n = int(input())
steps = list(map(int,input().split()))
dp = []

def frog(list,n,max):
    global dp
    if n == 0:
        dp.append(0)
    else:
        temp1 = abs(list[n] - list[n-1]) + dp[n-1]

        if n == 1:
            dp.append(temp1)
        else:
            temp2 = abs(list[n] - list[n-2]) + dp[n-2]
            if temp1 >= temp2:
                dp.append(temp2)
            else:
                dp.append(temp1)
for i in range(n):
    frog(steps,i,n)
print(dp[n-1])
Buggy python submission (verdict: Runtime Error):
from numpy import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))

Fixed submission:
from math import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    if i[0] != 1:
        s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))

Buggy python submission (verdict: Runtime Error):
rom numpy import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))

Fixed submission:
from math import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    if i[0] != 1:
        s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))

Buggy python submission (verdict: Runtime Error):
from numpy import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))

Fixed submission:
from math import sqrt
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

n = int(input())
fac = factorization(n)
s = 0
for i in fac:
    if i[0] != 1:
        s += (-1+sqrt(1+4*i[1]*2))//2
print(int(s))
Buggy python submission (verdict: Time Limit Exceeded):
n, k, c = map(int, input().split())
s = list(map(lambda x: 1 if x == 'o' else 0, input()))
b_a = []
c_k = 0
for i in range(n-1, -1, -1):
    if c_k == 0 and s[i] == 1:
        b_a.append(i)
        c_k = c
    else:
        c_k = max(c_k-1, 0)
c_k = 0
ans = []
for i in range(n):
    if c_k == 0 and s[i] == 1:
        if i in b_a:
            ans.append(i+1)
        c_k = c
    else:
        c_k = max(c_k-1, 0)
if len(ans) <= k:
    for i in ans:
        print(i)

Fixed submission:
from collections import deque
n, k, c = map(int, input().split())
s = list(map(lambda x: 1 if x == 'o' else 0, input()))
b_a = deque()
b_b = deque()
c_k = 0
for i in range(n-1, -1, -1):
    if c_k == 0 and s[i] == 1:
        b_a.append(i)
        c_k = c
    else:
        c_k = max(c_k-1, 0)
c_k = 0
for i in range(n):
    if c_k == 0 and s[i] == 1:
        b_b.append(i)
        c_k = c
    else:
        c_k = max(c_k-1, 0)

ans = list(set(b_a) & set(b_b))
ans.sort()
if len(ans) <= k:
    for i in ans:
        print(i+1)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == 'AAA' or S === 'BBB':
  print('No')
else:
  print('Yes')

Fixed submission:
s = input()
if s == 'AAA' or s == 'BBB':
  	print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
s = list(input())
if s[0] = "R":
  print("Sunny")
elif s[0] = "S":
  print("Cloudy")
else:
  print("Rainy")

Fixed submission:
s = list(input())
if s[0] == "R":
  print("Sunny")
elif s[0] == "S":
  print("Cloudy")
else:
  print("Rainy")
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = map(int,input().split())
human = [K for i in range(N)]
for i in range(Q):
     p = int(input())
     human = [human[j]-1 if j != p-1 else human[j] for j in range(N)]
for i in range(N):
    if human[i] <= 0:
        print("No")
    else:
        print("Yes")
    


Fixed submission:
N,K,Q = map(int,input().split())
human_win = [0 for i in range(N)]
win = Q - K

for i in range(Q):
     human_win[int(input())-1] += 1

for i in range(N):
    if human_win[i] > win:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

num = list(map(int,input().split()))
num_list=[]
per = []

for i in range(num[0],num[1]+1):
    num_list.append(i)
    
num_list = list(itertools.combinations(num_list, 2))

for i,j in num_list:
    per.append((i*j)%2019)
    if (i*j)%2019 == 0:
        break

per.sort()

print(per[0])

Fixed submission:
import itertools
import sys

num = list(map(int,input().split()))
per = []

for i in range(num[0],num[1]+1):
    for j in range(num[0],num[1]+1):
        if i <= j:
            break
        else:
            per.append((i*j)%2019)
            if (i*j)%2019 == 0:
                print(0)
                sys.exit()
per.sort()

print(per[0])

Buggy python submission (verdict: Time Limit Exceeded):
num = list(map(int,input().split()))
per = []

for i in range(num[0],num[1]+1):
    for j in range(num[0],num[1]+1):
        if i != j:
            per.append((i*j)%2019)
per.sort()

print(per[0])
        

Fixed submission:
import itertools
import sys

num = list(map(int,input().split()))
per = []

for i in range(num[0],num[1]+1):
    for j in range(num[0],num[1]+1):
        if i <= j:
            break
        else:
            per.append((i*j)%2019)
            if (i*j)%2019 == 0:
                print(0)
                sys.exit()
per.sort()

print(per[0])
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
K=int(input())
if a<b:
    if b<c:
        flag=0
    else:
        if b<c*(2**K):
            flag=0
        else:
            flag=1
else:
    while a>=b:
        if K>0:
            b=b*2
            K-=1
        else:
            flag=1
            break
    if K>0:
        if b<c:
            flag=0
        else:
            if b<c*(2**K):
                flag=0
            else:
                flag=1
if flag==0:
    print("Yes")
else:
    print("No")


Fixed submission:
a,b,c=map(int,input().split())
K=int(input())
flag=0
if a>=b:
    while a>=b:
        if K>0:
            b=b*2
            K-=1
        else:
            flag=1
            break
if b>=c and flag==0:
    while b>=c:
        if K>0:
            c=c*2
            K-=1
        else:
            flag=1
            break
            
if flag==0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
K=int(input())
if a<b:
    if b<c:
        flag=0
    else:
        if b<c*(2**K):
            flag=0
        else:
            flag=1
else:
    while a>=b:
        if K>0:
            b=b*2
            K-=1
        else:
            flag=1
            break
    if K>0:
        if b<c:
            flag=1
        else:
            if b<c*(2**K):
                flag=0
            else:
                flag=1
if flag==0:
    print("Yes")
else:
    print("No")


Fixed submission:
a,b,c=map(int,input().split())
K=int(input())
flag=0
if a>=b:
    while a>=b:
        if K>0:
            b=b*2
            K-=1
        else:
            flag=1
            break
if b>=c and flag==0:
    while b>=c:
        if K>0:
            c=c*2
            K-=1
        else:
            flag=1
            break
            
if flag==0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
a=list(map(int,input().split()))
pre=1
for i in range(K):
    pre*=a[i]
for i in range(K,N,1):
    now=pre*a[i]//a[i-K]
    if now>pre:
        print("Yes")
    else:
        print("No")
    pre=now


Fixed submission:
N,K=map(int,input().split())
a=list(map(int,input().split()))
for i in range(K,N,1):
    if a[i]>a[i-K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
a=list(map(int,input().split()))
pre=1
for i in range(K):
    pre*=a[i]
for i in range(K,N,1):
    now=pre*a[i]//a[i-K]
    if now>pre:
        print("Yes")
    else:
        print("No")
    pre=now


Fixed submission:
N,K=map(int,input().split())
a=list(map(int,input().split()))
for i in range(K,N,1):
    if a[i]>a[i-K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
a=list(map(int,input().split()))
queue=[]
pre=1
for i in range(K):
    aa=a.pop(0)
    pre*=aa
    queue.append(aa)
for i in range(K,N,1):
    aq=queue.pop(0)
    aa=a.pop(0)
    queue.append(aa)
    now=pre*aa//aq
    if now>pre:
        print("Yes")
    else:
        print("No")
    pre=now


Fixed submission:
N,K=map(int,input().split())
a=list(map(int,input().split()))
for i in range(K,N,1):
    if a[i]>a[i-K]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
for i in range(N):
    ans=a[i]
    for j in range(N):
        ans=ans ^ a[j]
    print(ans)


Fixed submission:
N=int(input())
a=list(map(int,input().split()))
tot=0
for i in range(N):
    tot=tot^a[i]
for i in range(N):
    print(tot^a[i])
Buggy python submission (verdict: Runtime Error):
x,N=map(int,input().split())
p=list(map(int,input().split()))
ans=101
if x in p:
    for i in range(102):
        if i in p:
            continue
        ans=min(ans,abs(p[i]-x))
    if x+ans in p:
        ans*=-1
else:
    ans=0
print(x+ans)


Fixed submission:
x,N=map(int,input().split())
p=list(map(int,input().split()))
p_set=set(p)
flag=0
if x not in p_set:
    ans=x
else:
    count=0
    while flag==0:
        count+=1
        if x+count not in p_set:
            ans=x+count
            flag=1
        if x-count not in p_set:
            ans=x-count
            flag=1
print(ans)

Buggy python submission (verdict: Runtime Error):
x,N=map(int,input().split())
p=list(map(int,input().split()))
p_set=set(p)
flag=0
if x not in p_set:
    ans=x
else:
    count=0
    while flag==0:
        count+=1
        if x+count not in p_set:
            ans=x+count
            flag=1
        if x-count not in p_set:
            ans=min(ans,x-count)
            flag=1
print(ans)


Fixed submission:
x,N=map(int,input().split())
p=list(map(int,input().split()))
p_set=set(p)
flag=0
if x not in p_set:
    ans=x
else:
    count=0
    while flag==0:
        count+=1
        if x+count not in p_set:
            ans=x+count
            flag=1
        if x-count not in p_set:
            ans=x-count
            flag=1
print(ans)

Buggy python submission (verdict: Runtime Error):
x,N=map(int,input().split())
p=list(map(int,input().split()))
p_set=set(p)
flag=0
if x not in p_set:
    ans=x
else:
    count=1
    while flag==0:
        if x+count not in p_set:
            ans=x+count
            flag=1
        if x-count not in p_set:
            ans=min(ans,x-count)
            flag=1
        count+=1
print(ans)


Fixed submission:
x,N=map(int,input().split())
p=list(map(int,input().split()))
p_set=set(p)
flag=0
if x not in p_set:
    ans=x
else:
    count=0
    while flag==0:
        count+=1
        if x+count not in p_set:
            ans=x+count
            flag=1
        if x-count not in p_set:
            ans=x-count
            flag=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
ans=1
for x in a:
    ans*=x

if ans>10**18:
    print(-1)
else:
    print(ans)


Fixed submission:
N=int(input())
a=list(map(int,input().split()))
flag=0
ans=1
if min(a)==0:
    ans=0
else:
    for x in a:
        ans*=x
        if ans>10**18:
            flag=1
            break
if flag==1:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
box=[[] for i in range(N)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[None]*(N)
ans[0]=0
que=[0]
while len(que)>0:
    index=que.pop(0)
    for x in box[index]:
        if ans[x]==None:
            ans[x]=index+1
            que.append(x)
print("Yes")
for i in range(1,N):
    print(ans[i])


Fixed submission:
N,M=map(int,input().split())
box=[[] for i in range(N)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[None]*(N)
ans[0]=0
que=[0]
while len(que)>0:
    index=que.pop(0)
    for x in box[index]:
        if ans[x]==None:
            ans[x]=index+1
            que.append(x)
print("Yes")
for i in range(1,N):
    print(ans[i])

Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
box=[[] for i in range(M)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[0]*(N)
que=[]
ans[0]=1
for i in range(N):
    if ans[i]!=0:
        que.extend(box[i])
    while len(que)>0:
        c=que.pop()
        if ans[c]==0:
            ans[c]=i+1
for i in range(1,N):
    if ans[i]==0:
        flag=0
        break
    else:
        flag=1
if flag==0:
    print("No")
else:
    print("Yes")
    for i in range(1,N):
        print(ans[i])


Fixed submission:
N,M=map(int,input().split())
box=[[] for i in range(N)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[None]*(N)
ans[0]=0
que=[0]
while len(que)>0:
    index=que.pop(0)
    for x in box[index]:
        if ans[x]==None:
            ans[x]=index+1
            que.append(x)
print("Yes")
for i in range(1,N):
    print(ans[i])

Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
box=[[] for i in range(M)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[0]*(N)
que=[]
ans[0]=1
for i in range(N):
    if ans[i]!=0:
        que+=box[i]
    while len(que)>0:
        c=que.pop()
        if ans[c]==0:
            ans[c]=i+1
for i in range(1,N):
    if ans[i]==0:
        flag=0
        break
    else:
        flag=1
if flag==0:
    print("No")
else:
    print("Yes")
    for i in range(1,N):
        print(ans[i])


Fixed submission:
N,M=map(int,input().split())
box=[[] for i in range(N)]
for i in range(M):
    a,b=map(int,input().split())
    box[a-1].append(b-1)
    box[b-1].append(a-1)
ans=[None]*(N)
ans[0]=0
que=[0]
while len(que)>0:
    index=que.pop(0)
    for x in box[index]:
        if ans[x]==None:
            ans[x]=index+1
            que.append(x)
print("Yes")
for i in range(1,N):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
ans=0
min_a=min(a)
for i in range(N-1,0,-1):
    num=a[i]
    for j in range(max(i-num+1-min_a,0)):
        if a[j]+num==i-j:
            ans+=1
print(ans)


Fixed submission:
N=int(input())
a=list(map(int,input().split()))
ans=0
L={}
R={}
for i in range(N):
    if a[i]+i in L:
         k=L.get(a[i]+i)
         del L[a[i]+i]
         L[a[i]+i]=k+1
    else:
        L[a[i]+i]=1
    if i-a[i]>0:
        if i-a[i] in R:
             k=R.get(i-a[i])
             del R[i-a[i]]
             R[i-a[i]]=k+1
        else:
            R[i-a[i]]=1
for x in L.keys():
    if x in R:
        ans+=L.get(x)*R.get(x)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
ans=0
min_a=min(a)
for i in range(N-1,0,-1):
    num=a[i]
    for j in range(max(i-num+1-min_a,0)):
        if a[j]+num==i-j:
            ans+=1
print(ans)


Fixed submission:
N=int(input())
a=list(map(int,input().split()))
ans=0
L={}
R={}
for i in range(N):
    if a[i]+i in L:
         k=L.get(a[i]+i)
         del L[a[i]+i]
         L[a[i]+i]=k+1
    else:
        L[a[i]+i]=1
    if i-a[i]>0:
        if i-a[i] in R:
             k=R.get(i-a[i])
             del R[i-a[i]]
             R[i-a[i]]=k+1
        else:
            R[i-a[i]]=1
for x in L.keys():
    if x in R:
        ans+=L.get(x)*R.get(x)
print(ans)

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


Fixed submission:
N=int(input())
a=list(map(int,input().split()))
ans=0
L={}
R={}
for i in range(N):
    if a[i]+i in L:
         k=L.get(a[i]+i)
         del L[a[i]+i]
         L[a[i]+i]=k+1
    else:
        L[a[i]+i]=1
    if i-a[i]>0:
        if i-a[i] in R:
             k=R.get(i-a[i])
             del R[i-a[i]]
             R[i-a[i]]=k+1
        else:
            R[i-a[i]]=1
for x in L.keys():
    if x in R:
        ans+=L.get(x)*R.get(x)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
S=[]
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.append(s)
print(len(S))


Fixed submission:
n=int(input())
S=set()
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.add(s)
print(len(S))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
S=[]
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.append(s)
print(len(S))


Fixed submission:
n=int(input())
S=set()
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.add(s)
print(len(S))