Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
if n == 0:
    print(x)
    exit()
p = list(map(int, input().split()))
q = []
for i in range(1, 101):
    if i in p:continue
    q.append(i)

import bisect
ind = bisect.bisect_left(q, x)
#print(ind)

temp1 = abs(q[ind - 1] - x)
temp2 = abs(q[ind] - x)
if temp1 <= temp2:print(q[ind - 1])
else:print(q[ind])

Fixed submission:
x, n = map(int, input().split())
if n != 0:
    p = list(map(int, input().split()))
else:
    print(x)
    exit()

ABS = 10 ** 9
ans = 0
for i in range(102):
    if i in p:continue

    temp = abs(i - x)
    if ABS > temp:
        ABS = temp
        ans = i
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
rec = 1

for i in a:
    rec = rec * i
if rec > 10 ** 18:
    print(-1)
else:
    print(rec)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
rec = 1
if 0 in a:
    print(0)
    exit()

for i in a:
    rec = rec * i
    if rec > 10 ** 18:
        print(-1)
        exit()
print(rec)
Buggy python submission (verdict: Time Limit Exceeded):
def com(n,r,mod):
    k=min(r,n-r)
    C=1
    for i in range(1,k+1):
        C=(C*(n+1-i)*pow(i,mod-2,mod))%mod
    return C

n, m, k = map(int,input().split())
mod = 998244353

cnt = 0
for i in range(k + 1):
    cnt = (cnt + com(n - 1, i, mod) * m * pow(m - 1, n - 1 - i, mod))%mod
print(cnt)

Fixed submission:
def pre_c(n, mod):
    f = [0] * (n + 1)
    g = [0] * (n + 1)
    for i in range(n + 1):
        if i == 0:
            f[i] = 1
            g[i] = 1
        else:
            f[i] = (f[i - 1] * i) % mod
            g[i] = pow(f[i], mod - 2, mod)

    return f, g
n, m, k = map(int,input().split())
mod = 998244353
F, G = pre_c(n - 1, mod)
cnt = 0
for i in range(k + 1):
    temp = F[n - 1] * G[i] * G[n - 1 - i] * m * pow(m - 1, n - 1 - i, mod)
    cnt = (cnt + temp) % mod
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
def check(i):
    a = 1
    while True:
        b = a - i
        temp = pow(a, 5) - pow(b, 5)
        #if i == 17:print(temp, a, b)
        if temp == x:
            return (a, b)
        if b > 0 and temp > x:
            return -1
        a += 1

num = int(pow(x, 0.5)//1)
for i in range(1, num + 1):

    if x % i == 0:
        temp = check(i)
        temp1 = check(x//i)
        if temp == -1 and temp1 == -1:continue
        else:
            if temp != -1:print(*temp)
            else:print(*temp1)
            exit()

Fixed submission:
x = int(input())
def check(i):
    a = 1
    while True:
        b = a - i
        temp = pow(a, 5) - pow(b, 5)
        #if i == 17:print(temp, a, b)
        if temp == x:
            return (a, b)
        if b > 0 and temp > x:
            return -1
        a += 1

num = int(pow(x, 0.5)//1)
for i in range(1, num + 1):

    if x % i == 0:
        temp = check(i)
        if temp == -1:continue
        else:
            print(*temp)
            exit()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range(n - 2):
    for j in range(a[i] + 1 + i, n):
        if j - i == a[j] + a[i]:ans += 1
print(ans)

Fixed submission:
from collections import defaultdict
n = int(input())
a = list(map(int,input().split()))
cnt_i = defaultdict(lambda :0)
cnt_j = defaultdict(lambda :0)
for i in range(n):
    temp_i = a[i] + i + 1
    temp_j = i + 1 - a[i]
    cnt_i[temp_i] += 1
    cnt_j[temp_j] += 1

ans = sum(v * cnt_j[i] for i,v in cnt_i.items())
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()

dict={'R':1,'G':2,'B':3}
num={1:'R',2:'G',3:'B'}

snum=[[0,0,0] for i in range(n)]
for i in range(n):
    if i == 0:
        snum[0][dict[s[i]]-1] = 1
        continue
    for j in range(3):
        if dict[s[i]]-1 == j:
            snum[i][j] = snum[i-1][j] + 1
        else:
            snum[i][j] = snum[i-1][j]
#print(snum)
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        temp=s[i]
        temp1=s[j]
        if temp == temp1:continue

        temp_num=6-dict[temp]-dict[temp1]
        temp2=num[temp_num]
        count=snum[-1][temp_num-1]-snum[j][temp_num-1]
        #print(count)
        if 2*j-i<n and s[2*j-i] == temp2:
            count-=1
        ans+=count
print(ans)

Fixed submission:
n=int(input())
s=input()

dict={'R':1,'G':2,'B':3}
num={1:'R',2:'G',3:'B'}

snum=[[0,0,0] for i in range(n)]
for i in range(n):
    if i == 0:
        snum[0][dict[s[i]]-1] = 1
        continue
    for j in range(3):
        if dict[s[i]]-1 == j:
            snum[i][j] = snum[i-1][j] + 1
        else:
            snum[i][j] = snum[i-1][j]
#print(snum)
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        temp=s[i]
        temp1=s[j]
        if temp == temp1:continue

        temp_num=6-dict[temp]-dict[temp1]
        temp2=num[temp_num]
        count=snum[-1][temp_num-1]-snum[j][temp_num-1]
        #print(count)
        if 2*j-i<n and s[2*j-i] == temp2:
            count-=1
        ans+=count
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
if 2*n<=k:
    num1=k//n
    n=k-n*(num1-1)
    num = int(n / k)
    ans = min(abs(n - num * k), abs(n - (num + 1) * k))
    print(ans)
elif n<=k<2*n:
    print(min(k-n,k-2*n))
else:
    num=int(n/k)
    ans=min(n-num*k,abs(n-(num+1)*k))
    print(ans)


Fixed submission:
import math
n,k=map(int,input().split())
num=n//k
n=n-num*k
ans=min(abs(k-n),n)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s='abcdefghijklmnopqrstuvwxyz'
bottom=[[] for i in range(10)]
bottom[0]=['a']

def solve(n):
    num=0
    while num<=n:
        num=num+1
        for base in bottom[num-1]:
            for i in s[:num+1]:
                if ord(i)-ord(base[-1])>1:continue
                bottom[num].append(base+i)

solve(n-1)
print(*bottom[n-1],sep='\n')

Fixed submission:
n=int(input())
s='abcdefghijklmnopqrstuvwxyz'
bottom=[[] for i in range(10)]
bottom[0]=['a']

def solve(n):
    num=0
    while num<n:
        num=num+1
        for base in bottom[num-1]:
            for i in s[:num+1]:
                if i!='a' and chr(ord(i)-1) not in base:break
                bottom[num].append(base+i)

solve(n-1)
#print(*bottom[n-2])
print(*bottom[n-1],sep='\n')

Buggy python submission (verdict: Runtime Error):
n=int(input())
s='abcdefghij'
bottom=[[] for i in range(10)]
bottom[0]=['a']

def solve(n):
    num=0
    while num<=n:
        num=num+1
        for base in bottom[num-1]:
            for i in s[:num+1]:
                if ord(i)-ord(base[-1])>1:continue
                bottom[num].append(base+i)

solve(n-1)
print(*bottom[n-1],sep='\n')

Fixed submission:
n=int(input())
s='abcdefghijklmnopqrstuvwxyz'
bottom=[[] for i in range(10)]
bottom[0]=['a']

def solve(n):
    num=0
    while num<n:
        num=num+1
        for base in bottom[num-1]:
            for i in s[:num+1]:
                if i!='a' and chr(ord(i)-1) not in base:break
                bottom[num].append(base+i)

solve(n-1)
#print(*bottom[n-2])
print(*bottom[n-1],sep='\n')
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,a,b):
    temp=1
    a=min(a,n-a)
    b=min(b,n-b)
    A=a if a<b else b
    B=a+b-A
    for i in range(B):
        temp*=pow(i+1,mod-2,mod)*(n-i)%mod
        if i+1==A:
            ComA=temp

    return (ComA+temp)%mod
#二分累乗法を勉強する
ans=pow(2,n,mod)-1-comb(n,a,b)
print(ans%mod)

Fixed submission:
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k):
    temp=1
    k=min(k,n-k)
    for i in range(1,k+1):
        temp=temp*pow(i,mod-2,mod)
        temp=temp*(n-i+1)%mod

    return temp%mod
#二分累乗法を勉強する
ans=pow(2,n,mod)-1-comb(n,a)-comb(n,b)
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k):
    temp=1
    k=min(k,n-k)
    for i in range(k):
        temp*=(n-i)
        temp//=(i+1)

    return temp%mod
#二分累乗法を勉強する
ans=pow(2,n,mod)-1-(comb(n,a)+comb(n,b))
print(ans)

Fixed submission:
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k):
    temp=1
    k=min(k,n-k)
    for i in range(1,k+1):
        temp=temp*pow(i,mod-2,mod)
        temp=temp*(n-i+1)%mod

    return temp%mod
#二分累乗法を勉強する
ans=pow(2,n,mod)-1-comb(n,a)-comb(n,b)
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import math
def comb(a,b,p):
    if b==0:
        return 1
    elif b%2==0:
        d=comb(a,b//2,p)
        return (d*d)%p
    else:
        return (a*comb(a,b-1,p))%p

n,a,b=map(int,input().split())
num=10**9+7

l=[]
for i in [a,n-a,b,n-b]:
    temp=1
    for j in range(1,i+1):
        temp*=comb(j,num-2,num)

    l.append(temp%num)

ans = comb(2,n,num)-1-((math.factorial(n)%num)*(l[0]*l[1]+l[2]*l[3]))%num
print(ans)
#print(l)


Fixed submission:
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k):
    temp=1
    k=min(k,n-k)
    for i in range(1,k+1):
        temp=temp*pow(i,mod-2,mod)
        temp=temp*(n-i+1)%mod

    return temp%mod
#二分累乗法を勉強する
ans=pow(2,n,mod)-1-comb(n,a)-comb(n,b)
print(ans%mod)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))
maxim=0
ans=[]
for i in range(n-k+1):
    if maxim<=sum(p[i:i+k]):
        maxim=sum(p[i:i+k])
        ans=p[i:i+k]
ans1=(sum(ans)+k)/2

print(ans1)


Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
maxim=[0]*(n-k+1)
cnt=0
s=0
for i in range(n):
    cnt+=1
    s+=p[i]
    if cnt==k:
        maxim[i-(k-1)]=s
        cnt=k-1
        s+=-p[i-(k-1)]

ans=(max(maxim)+k)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))
maxim=0
ans=[]
for i in range(n-k+1):
    if maxim<=sum(p[i:i+k]):
        maxim=sum(p[i:i+k])
        ans=p[i:i+k]

ans1=0
for i in ans:
    ans1+=(i+1)/2

print(ans1)


Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
maxim=[0]*(n-k+1)
cnt=0
s=0
for i in range(n):
    cnt+=1
    s+=p[i]
    if cnt==k:
        maxim[i-(k-1)]=s
        cnt=k-1
        s+=-p[i-(k-1)]

ans=(max(maxim)+k)/2
print(ans)
Buggy python submission (verdict: Runtime Error):
h,n=map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]

dp=[float('inf')]*(h+1)
dp[0]=0
for i in range(h):
    for j in range(n):

        next=i+ab[j][0] if i+ab[j][0]<=h else h
        dp[next]=min(dp[next],dp[i]+ab[j][1])
print(dp[-1])


Fixed submission:
import math
h,a=map(int,input().split())

print(math.ceil(h/a))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))

cnt=0
for i in range(n):
    tem=0
    for j in range(0,i+1):
        if p[i]>p[j]:
            tem=0
            break
        tem+=1
    if tem>=1:
        cnt+=1

print(cnt)

Fixed submission:
#C
n=int(input())
p=list(map(int,input().split()))
ans=1
m=p[0]
for i in range(1,n):
    if m>=p[i]:
        ans+=1
        m=p[i]
    
print(ans)
Buggy python submission (verdict: Runtime Error):
#151-D:BFS
from collections import deque
#スタート地点loc=(sx,sy)を決めたときのゴールをbfsで求める
def bfs(loc):
    global tem_ans
    d=[[float('inf')]*w for i in range(h)]

    #進む方向を決める
    dx=[1,0,-1,0]
    dy=[0,1,0,-1]

    que=deque([])
    que.append(loc)
    d[loc[0]][loc[1]]=0

    #遷移していってこれ以上遷移できない状態まで埋める
    while que:
        p=que.popleft()
        for i in range(4):
            nx=p[0]+dx[i]
            ny=p[1]+dy[i]

            #遷移可能かどうか調べる
            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and d[nx][ny]==float('inf'):
                #移動後の距離を保存
                d[nx][ny]=d[p[0]][p[1]]+1
                que.append([nx,ny])

                if tem_ans<d[nx][ny]:
                    tem_ans=d[nx][ny]
    return tem_ans



h,w=map(int,input().split())
maze=[list(input()) for i in range(h)]
ans=0
tem_ans=0

loc=[]
for i in range(h):
    for j in range(w):
        #通路をスタート地点に設定する
        if maze[i][j]!='#':
            loc=[i,j]

        ans=max(ans,bfs(loc))

print(ans)

Fixed submission:
#151-D:BFS
from collections import deque
#スタート地点loc=(sx,sy)を決めたときのゴールをbfsで求める
def bfs(loc):
    global tem_ans
    d=[[float('inf')]*w for i in range(h)]

    #進む方向を決める
    dx=[1,0,-1,0]
    dy=[0,1,0,-1]

    que=deque([])
    que.append(loc)
    d[loc[0]][loc[1]]=0

    #遷移していってこれ以上遷移できない状態まで埋める
    while que:
        p=que.popleft()
        for i in range(4):
            nx=p[0]+dx[i]
            ny=p[1]+dy[i]

            #遷移可能かどうか調べる
            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and d[nx][ny]==float('inf'):
                #移動後の距離を保存
                d[nx][ny]=d[p[0]][p[1]]+1
                que.append([nx,ny])

                if tem_ans<d[nx][ny]:
                    tem_ans=d[nx][ny]
    return tem_ans



h,w=map(int,input().split())
maze=[list(input()) for i in range(h)]
ans=0
tem_ans=0

loc=[]
for i in range(h):
    for j in range(w):
        #通路をスタート地点に設定する
        if maze[i][j]!='#':
            loc=[i,j]
        else:
            continue
        ans=max(ans,bfs(loc))

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
fs=0
a=sorted(a)
from itertools import combinations
#listからkコ選ぶ組み合わせ
for i in combinations(a,k):
    fs+=(i[-1]-i[0])%(10**9+7)
    if fs>=10**9+7:
        fs=fs%(10**9+7)
print(fs)   

Fixed submission:
def pre_c(n, mod):
    f = [0] * (n + 1)
    g = [0] * (n + 1)
    for i in range(n + 1):
        if i == 0:
            f[i] = 1
            g[i] = 1
        else:
            f[i] = (f[i - 1] * i) % mod
            g[i] = pow(f[i], mod - 2, mod)

    return f, g

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
mod = 10 ** 9 + 7
f, g = pre_c(n, mod)

ans = 0
for i in range(n - k + 1):
    min_temp = a[i] * f[n - i - 1] * g[k - 1] * g[n - i - 1 - k + 1] % mod
    max_temp = a[n - i - 1] * f[n - i - 1] * g[k - 1] * g[n - i - 1 - k + 1] % mod

    ans = (ans + (max_temp - min_temp) % mod ) %mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
fs=0
a=sorted(a)
from itertools import combinations
#listからkコ選ぶ組み合わせ
for i in combinations(a,k):
    fs+=(i[-1]-i[0])%(10**9+7)
    if fs>=10**9+7:
        fs=fs%(10**9+7)
print(fs)    

Fixed submission:
def pre_c(n, mod):
    f = [0] * (n + 1)
    g = [0] * (n + 1)
    for i in range(n + 1):
        if i == 0:
            f[i] = 1
            g[i] = 1
        else:
            f[i] = (f[i - 1] * i) % mod
            g[i] = pow(f[i], mod - 2, mod)

    return f, g

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
mod = 10 ** 9 + 7
f, g = pre_c(n, mod)

ans = 0
for i in range(n - k + 1):
    min_temp = a[i] * f[n - i - 1] * g[k - 1] * g[n - i - 1 - k + 1] % mod
    max_temp = a[n - i - 1] * f[n - i - 1] * g[k - 1] * g[n - i - 1 - k + 1] % mod

    ans = (ans + (max_temp - min_temp) % mod ) %mod
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
ans1=(k-1)//2+1
ans2=min(b-1,n-a)
print(min(ans1,ans2))

Fixed submission:
n,a,b=map(int,input().split())
k=b-a-1
if k%2!=0:#間の卓が奇数
    ans=(k+1)//2
    print(ans)    
else:#偶数
    ans=min(b-1,n-a)
    ans1=min(a-1,n-b)+1+k//2
    print(min(ans,ans1))

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
min_=min(a,b)
max_=max(a,b)

k=max_-min_-1
if k%2!=0:#間の卓が奇数
    if k==1:
        print(k)
    else:
        ans=(k-1)//2+""
        print(ans)
else:#偶数
    ans=min(max_-1,n-min_)
    print(ans)

Fixed submission:
n,a,b=map(int,input().split())
k=b-a-1
if k%2!=0:#間の卓が奇数
    ans=(k+1)//2
    print(ans)    
else:#偶数
    ans=min(b-1,n-a)
    ans1=min(a-1,n-b)+1+k//2
    print(min(ans,ans1))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
import fractions

gcd=fractions.gcd(a,b)#最大公約数
lcm=a*b//gcd#最小公倍数least common multiple
print(lmc)

Fixed submission:
a,b=map(int,input().split())
import fractions
 
gcd=fractions.gcd(a,b)#最大公約数
lcm=a*b//gcd#最小公倍数least common multiple
print(lcm)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=list(range(2,n+1))
ans=10**9
for i in l:
    if n%i==0:
        a=i+int(n/i)-2
        ans=min(ans,a)
print(ans)

Fixed submission:
n=int(input())
l=list(range(2,int(n**0.5//1+1)))
ans=n-1
count=0
for i in l:
    if n%i==0:
        a=i+int(n/i)-2
        ans=min(ans,a)
        count+=1
print(ans if count>0 else n-1)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()
ss=set(s)
l=[0]
for j in range(n):
    for i in ss:
        if l[0]!=s:
            s=s.replace(i*2,i)
            l[0]==s
        else:
            break
print(len(s))


Fixed submission:
n=int(input())
s=input()
ss=set(s)
l=s[0]
count=1
for j in range(n):
    if l!=s[j]:
        count+=1
        l=s[j]
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()
ss=set(s)
for j in range(n):
    for i in ss:
        s=s.replace(i*2,i)

print(len(s))

Fixed submission:
n=int(input())
s=input()
ss=set(s)
l=s[0]
count=1
for j in range(n):
    if l!=s[j]:
        count+=1
        l=s[j]
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=[]
for i in range(n):
    ans+=[a.index(i+1)+1]
print(*ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
dic=dict(zip(a,b))
dic=sorted(dic.items())
c=[]
for i in dic:
    c.append(i[1])
print(*c)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=[]
for i in range(n):
    ans+=[a.index(i+1)+1]
print(*ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
dic=dict(zip(a,b))
dic=sorted(dic.items())
c=[]
for i in dic:
    c.append(i[1])
print(*c)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(n):
    ans+=str(a.index(i+1)+1)+' '
print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
dic=dict(zip(a,b))
dic=sorted(dic.items())
c=[]
for i in dic:
    c.append(i[1])
print(*c)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(n):
    ans+=str(a.index(i+1)+1)+' '
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
dic=dict(zip(a,b))
dic=sorted(dic.items())
c=[]
for i in dic:
    c.append(i[1])
print(*c)
Buggy python submission (verdict: Runtime Error):
s=list(input())

s_odd=s[0::2] 
s_even=s[1::2]

if s_odd.find('L')=='-1' and s_even.find('R')=='-1':
    print('Yes')
else:
    print('No')

Fixed submission:
s=list(input())

s_odd=''.join(s[0::2]) #偶数項、奇数項に分類する
s_even=''.join(s[1::2])

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s_odd=list(A=input())[0::2]
s_even=list(A)[1::2]
if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

Fixed submission:
s=list(input())

s_odd=''.join(s[0::2]) #偶数項、奇数項に分類する
s_even=''.join(s[1::2])

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s=list(input())

s_odd=s[0::2] 
s_even=s[1::2]

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

Fixed submission:
s=list(input())

s_odd=''.join(s[0::2]) #偶数項、奇数項に分類する
s_even=''.join(s[1::2])

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s=list(input())

s_odd=s[0::2]
s_even=s[1::2]

if s_odd.find(L)==-1 and s_even.find(R)==-1:
    print('Yes')
else:
    print('No')

Fixed submission:
s=list(input())

s_odd=''.join(s[0::2]) #偶数項、奇数項に分類する
s_even=''.join(s[1::2])

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
a_set=set(a)
b=q-k+1
san=list(range(1,n+1))
for i in san:
    if i in a_set and b>0:
        if a.count(i)>=b:
            print('Yes')
        else:
            print('No')
    elif b<=0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
score=[k-q]*n
for i in a:
    score[i-1]+=1
for i in score:
    if i>0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
a_set=set(a)
b=q-k+1
san=list(range(1,n+1))
for i in san:
    if i in a_set and b>0:
        if a.count(i)>=b:
            print('Yes')
        else:
            print('No')
    elif b<=0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
score=[k-q]*n
for i in a:
    score[i-1]+=1
for i in score:
    if i>0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
s,t=input(),input()
count=0
for i in range(3):
    if s[i]==t[i]:
        count+=1

print(count)

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