Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03238 (python)

Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x = ni()
if x == 1:
    print("Hello World")
else:
    a = ni()
    b = ni()
    print(a+b)

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
def tr(x):
    if "DEBUG" in globals(): sys.stderr.write(f"{x}\n")

x = ni()
if x == 1:
    print("Hello World")
else:
    a, b = na()
    print(a+b)

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
def tr(x):
    if "DEBUG" in globals(): sys.stderr.write(f"{x}\n")

x = ni()
if x == 1:
    print("Hello World")
else:
    a = ni()
    b = ni()
    print(a+b)
Problem p03239 (python)

Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n, t = na()

mincost = 99999999999999
for i in range(n):
    c, u = na()
    if u <= t:
        mincost = min(mincost, c)

if mincost == 99999999999999:
    print("TLE")
else:
    print(mincost)

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
def tr(x):
    if "DEBUG" in globals(): sys.stderr.write(f"{x}\n")

n, t = na()

mincost = 99999999999999
for i in range(n):
    c, u = na()
    if u <= t:
        mincost = min(mincost, c)

if mincost == 99999999999999:
    print("TLE")
else:
    print(mincost)
Problem p03323 (python)

Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b = na()

if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a = ni()
b = ni()

if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03605 (python)

Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

print("Yes" if "9" in ns() else "No")

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

print("Yes" if "9" in ns else "No")
Problem p03608 (python)

Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n,m,r=na()
rs = na()
for i in range(r):
    rs[i] -= 1

g = [[99999999999]*n for _ in range(n)]
for i in range(n):
    g[i][i] = 0
for i in range(m):
    a, b, c = na()
    a -= 1
    b -= 1
    g[a][b] = g[b][a] = c

for k in range(n):
    for i in range(n):
        for j in range(n):
            g[i][j] = min(g[i][j], g[i][k] + g[k][j])

from itertools import *

ans = 9999999999999999999
for ord in permutations(rs):
    w = 0
    for i in range(1, r):
        w += g[ord[i-1]][ord[i]]
    ans = min(ans, w)
print(ans)

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n,m,r=na()
rs = na()
for i in range(r):
    rs[i] -= 1

g = [[99999999999]*n for _ in range(n)]
for i in range(n):
    g[i][i] = 0
for i in range(m):
    a, b, c = na()
    a -= 1
    b -= 1
    g[a][b] = g[b][a] = c

from heapq import *
def dijkstra(g, start):
    n = len(g)
    ds = [1e18] * n
    ds[start] = 0
    h = []
    heappush(h, (0, start))
    while len(h) > 0:
        d, cur = heappop(h)
        if d != ds[cur]: continue
        for e, ew in g[cur]:
            if d + ew < ds[e]:
                ds[e] = d + ew
                heappush(h, (ds[e], e))
    return ds

def dijkstra_dense(g, start):
    n = len(g)
    ds = [1e18] * n
    ds[start] = 0

    done = [0] * n
    while True:
        lmin = 1e19
        arg = -1
        for i in range(n):
            if not done[i] and ds[i] < lmin:
                lmin = ds[i]
                arg = i
        if arg == -1: break
        done[arg] = 1
        for i in range(n):
            ds[i] = min(ds[i], lmin + g[arg][i])
    return ds


dss = [None] * n
for r in rs:
    dss[r] = dijkstra_dense(g, r)

from itertools import *

ans = 9999999999999999999
for ord in permutations(rs):
    w = 0
    for i in range(1, r):
        w += dss[ord[i-1]][ord[i]]
    ans = min(ans, w)
print(ans)
Problem p03719 (python)

Fixed submission:
import sys

stdin = sys.stdin


def na(): return map(int, stdin.readline().split())


def ns(): return stdin.readline().strip()


a,b,c = na()
if a <= c <= b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys

stdin = sys.stdin


def na(): return map(int, stdin.readline().split())


def ns(): return stdin.readline().strip()


a,b,c = map(int, stdin.readlien().split())
if a <= c <= b:
    print("Yes")
else:
    print("No")
Problem p02845 (python)

Fixed submission:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    """
    N = read_int()
    A = read_ints()
    T = [0, 0, 0]
    answer = 1
    modulo = 1000000007
    for a in A:
        if a not in T:
            return 0
        answer = (answer*T.count(a))%modulo
        T[T.index(a)] += 1
    return answer


if __name__ == '__main__':
    print(solve())

Buggy submission (verdict: Runtime Error):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    """
    N = read_int()
    A = read_ints()
    T = [0, 0, 0]
    answer = 1
    modulo = 1000000007
    for a in A:
        answer = (answer*T.count(a))%modulo
        T[T.index(a)] += 1
    return answer


if __name__ == '__main__':
    print(solve())
Problem p02901 (python)

Fixed submission:
from typing import List, Any


def read_int() -> int:
    return int(input().strip())


def read_ints() -> List[int]:
    return list(map(int, input().strip().split(' ')))


def solve() -> Any:
    N, M = read_ints()
    # key to cover
    cover = [0]*M
    # key to cost
    costs = [0]*M
    INF = 10**9+1
    for i in range(M):
        a, b = read_ints()
        costs[i] = a
        for c in read_ints():
            cover[i] |= 1<<(c-1)
    # mask to cost
    mask_to_cost = [INF]*(1<<N)
    mask_to_cost[0] = 0
    for mask in range(1<<N):
        for i in range(M):
            mask_to_cost[cover[i]|mask] = min(mask_to_cost[cover[i]|mask], mask_to_cost[mask]+costs[i])
    return mask_to_cost[(1<<N)-1] if mask_to_cost[(1<<N)-1] != INF else -1


if __name__ == '__main__':
    print(solve())

Buggy submission (verdict: Runtime Error):
from typing import List, Any


def read_int() -> int:
    return int(input().strip())


def read_ints() -> List[int]:
    return list(map(int, input().strip().split(' ')))


def solve() -> Any:
    N, M = read_ints()
    # key to cover
    cover = [0]*(1<<N)
    # key to cost
    costs = [0]*M
    INF = 10**9+1
    for i in range(M):
        a, b = read_ints()
        costs[i] = a
        for c in read_ints():
            cover[i] |= 1<<(c-1)
    # mask to cost
    mask_to_cost = [INF]*(1<<N)
    mask_to_cost[0] = 0
    for mask in range(1<<N):
        for i in range(M):
            mask_to_cost[cover[i]|mask] = min(mask_to_cost[cover[i]|mask], mask_to_cost[mask]+costs[i])
    return mask_to_cost[(1<<N)-1] if mask_to_cost[(1<<N)-1] != INF else -1


if __name__ == '__main__':
    print(solve())
Problem p03813 (python)

Fixed submission:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    x = read_int()
    if x < 1200:
        return 'ABC'
    return 'ARC'


if __name__ == '__main__':
    print(solve())

Buggy submission (verdict: Runtime Error):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    A, B, C, D = read_ints()
    return max(A*B, C*D)


if __name__ == '__main__':
    print(solve())
Problem p02613 (python)

Fixed submission:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 0

def solve():
    



    # for _ in range(ii()):

    n=ii()
    m={}
    a=["AC","WA","TLE","RE"]
    m['WA']=0
    m['TLE']=0
    m["AC"]=0
    m["RE"]=0
    for i in range(n):
        s=si()
        m[s]+=1
    for i in a:
        print(i,end=" x ")
        print(m[i])












  
















if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()

Buggy submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1

def solve():
    



    # for _ in range(ii()):

    n=ii()
    m={}
    a=["AC","WA","TLE","RE"]
    m['WA']=0
    m['TLE']=0
    m["AC"]=0
    m["RE"]=0
    for i in range(n):
        s=si()
        m[s]+=1
    for i in a:
        print(i,end=" x ")
        print(m[i])












  
















if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()
Problem p02677 (python)

Fixed submission:
import math
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())



def calcAngle(h,m): 
          
    # validate the input 
    if (h < 0 or m < 0 or h > 12 or m > 60): 
        print('Wrong input') 
      
    if (h == 12): 
        h = 0
    if (m == 60): 
        m = 0
      
    # Calculate the angles moved by  
    # hour and minute hands with  
    # reference to 12:00 
    hour_angle = 0.5 * (h * 60 + m) 
    minute_angle = 6 * m 
      
    # Find the difference between two angles 
    angle = abs(hour_angle - minute_angle) 
    angle = min(360 - angle, angle) 
      
    return angle 
      
a,b,h,m=mi()
x=calcAngle(h,m)
if(x==0):
    print(abs(a-b))
    exit(0)
x=180/x
x1=math.cos(pi/x)
# print(x1
x=(a*a+b*b)-(2*a*b*x1)
print(sqrt(x))

Buggy submission (verdict: Runtime Error):
import math
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())



def calcAngle(h,m): 
          
    # validate the input 
    if (h < 0 or m < 0 or h > 12 or m > 60): 
        print('Wrong input') 
      
    if (h == 12): 
        h = 0
    if (m == 60): 
        m = 0
      
    # Calculate the angles moved by  
    # hour and minute hands with  
    # reference to 12:00 
    hour_angle = 0.5 * (h * 60 + m) 
    minute_angle = 6 * m 
      
    # Find the difference between two angles 
    angle = abs(hour_angle - minute_angle) 
    angle = min(360 - angle, angle) 
      
    return angle 
      
a,b,h,m=mi()
x=calcAngle(h,m)
x=180/x
x1=math.cos(pi/x)
x=(a*a+b*b)-(2*a*b*x1)
print(sqrt(x))
Problem p02717 (python)

Fixed submission:

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

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd



def main():
    
    # a=list(map(int,input().split()))
    # s=input()
    
    a,b,c=map(int,input().split())
    a,b=b,a
    a,c=c,a
    print(a,b,c)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      
if __name__ =="__main__":
    main()
Problem p02772 (python)

Fixed submission:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0):
            if(i%3!=0 and i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
if __name__ =="__main__":
    main()

Buggy submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0);
            if(i%3!=0 or i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
if __name__ =="__main__":
    main()
Problem p02789 (python)

Fixed submission:
# from math import ceil,sqrt,log,gcd
# def ii():return int(input())
# def si():return input()
# def mi():return map(int,input().split())
# def li():return list(mi())




n,m=map(int,input().split())
if(n==m):
    print("Yes")
else:
    print('No')

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())




n,m=map(int,input().split())
if(n==m):
    print("Yes")
else:
    print('No')

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())




n,m=mi()
if(n==m):
    print("Yes")
else:
    print('No')

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())




n,m=mi()
print("Yes" if n==m else "No")

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())




n,m=mi()
print("Yes"if n==m else "No")
Problem p02957 (python)

Fixed submission:
# from math import ceil,sqrt,log,gcd,pi
# def ii():return int(input())
# def si():return input()
# def mi():return map(int,input().split())
# def li():return list(mi())

# for _ in range(ii()):
a,b=map(int,input().split())
s=(a+b)
if(s==0 or s%2):
    print("IMPOSSIBLE")
else:
    x=0
    if(s!=0):
        x=abs(s)//2
    print(x)

Buggy submission (verdict: Runtime Error):
#from math import ceil,sqrt,log,gcd,pi
#def ii():return int(input())
#def si():return input()
#def mi():return map(int,input().split())
#def li():return list(mi())

n=ii()
a=li()
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
# print(x)
if(len(x)>2):
    print("No")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('No')
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

# for _ in range(ii()):
a,b=mi()
if((b+a)%2):
    print("IMPOSSIBLE")
else:
    x=abs(b+a)//2
    print(x)

Buggy submission (verdict: Runtime Error):
import math
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

# for _ in range(ii()):
a,b=mi()
if((b+a)%2):
    print("IMPOSSIBLE")
else:
    x=abs(b+a)//2
    # print(abs(a-x),abs(b-x))
    if(abs(a-x)==abs(b-x)):
        print(abs(a-x))
    else:
        print(x)
Problem p02958 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
if(len(x)>2):
    print("NO")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('NO')
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

n=int(input())
a=list(map(int,input().split()))
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
# print(x)
if(len(x)>2):
    print("NO")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('NO')
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

n=ii()
a=li()
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
# print(x)
if(len(x)>2):
    print("No")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('No')
else:
    print("Yes")
Problem p03543 (python)

Fixed submission:
def main():
	S = input()
	if (S[0] == S[1] and S[1] == S[2]) or (S[2] == S[1] and S[3] == S[2]):
		print("Yes")
	else:
		print("No")
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
	S = raw_input()
	if (S[0] == S[1] and S[1] == S[2]) or (S[2] == S[1] and S[3] == S[2]):
		print("Yes")
	else:
		printf("No")
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
	S = raw_input()
	if (S[0] == S[1] and S[1] == S[2]) or (S[2] == S[1] and S[3] == S[2]):
		print("Yes")
	else:
		printf("No")
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
	S = input()
	if (S[0] == S[1] and S[1] == S[2]) or (S[2] == S[1] and S[3] == S[2]):
		print("Yes")
	else:
		printf("No")
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
	S = input()
	if (S[0] == S[1] and S[1] == S[2]) or (S[2] == S[1] and S[3] == S[2]):
		print("Yes")
	else:
		printf("No")
if __name__ == '__main__':
    main()
Problem p02690 (python)

Fixed submission:
X=int(input())

def ok(B):
    i=1
    B=abs(B)
    while i**5<B:
        i+=1
    return i**5==B

def get(B):
    f = B/abs(B)
    i=1
    B=abs(B)
    while i**5<B:
        i+=1
    return int(i*f)



A_cand=[]
i=0
while i**5<=10**10:
    A_cand.append(i)
    i+=1

#print(A_cand)
for a in range(300):
    B_5=a**5-X
    if ok(B_5):
        r=get(B_5)
        print(a,r)
        exit()
        break
for a in A_cand:
    a*=-1
    B_5=a**5-X
    if ok(B_5):
        r=get(B_5)
        print(a,r)
        exit()
print(0/0)

Buggy submission (verdict: Runtime Error):
X=int(input())

def ok(B):
    i=1
    B=abs(B)
    while i**5<B:
        i+=1
    return i**5==B

def get(B):
    f = B/abs(B)
    i=1
    B=abs(B)
    while i**5<B:
        i+=1
    return int(i*f)



A_cand=[]
i=0
while i**5<=10**10:
    A_cand.append(i)
    i+=1

#print(A_cand)
for a in A_cand:
    B_5=a**5-X
    if ok(B_5):
        r=get(B_5)
        print(a,r)
        exit()
        break
for a in A_cand:
    a*=-1
    B_5=a**5-X
    if ok(B_5):
        r=get(B_5)
        print(a,r)
        exit()
print(0/0)
Problem p02702 (python)

Fixed submission:
from collections import defaultdict
S = input()
N = len(S)

DP=[0]*(N+1)
for i,s in enumerate(reversed(S)):
    DP[i+1]=(DP[i]+pow(10,i,2019)*int(s))%2019

D=defaultdict(int)
for dp in DP:
    D[dp]+=1

ans=0
for dp in D.values():
    ans += dp*(dp-1)//2

print(ans)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
S = input()
N = len(S)

D=defaultdict()
prev=0
ans=0
for i,s in enumerate(reversed(S)):
    cur=prev+pow(10,i,2019)*int(s)%2019
    ans+=D[cur]
    D[cur]+=1
    prev=cur
print(ans)
Problem p02730 (python)

Fixed submission:
S=input()
ans="Yes"
if all(a==b for a,b in zip(S,reversed(S))):
    if all(a==b for a,b in zip(S,reversed(S[:len(S)//2]))):
            pass
    else:
        ans="No"
else:
    ans="No"
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
ans="Yes"
if all(a==b for a,b in zip(S,reversed(S))):
    if all(a==b for a,b in zip(S,reversed(S[:N//2]))):
            pass
    else:
        ans="No"
else:
    ans="No"
print(ans)
Problem p02772 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
if all(v%2==1 or v%3==0 or v%5==0 for v in A):
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
if all(v%2==1 or v%3==0 or v%5==0):
    print("APPROVED")
else:
    print("DENIED")
Problem p02780 (python)

Fixed submission:
N, K = map(int, input().split())
L = list(map(int, input().split()))
E = [(v+1)/2 for v in L]
tmp = sum(E[:K])
ans = tmp
for l, p in zip(E[K:], E):
    tmp = tmp+l-p
    ans = max(ans, tmp)
print(ans)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
L=list(map(int,input().split()))
E=[(V+1)//2 for v in L]
ans=sum(E[:K])
last=E[0]
for l in E[K:]:
  ans = max(ans,ans-last+l)
  last = l
print(ans)
Problem p02786 (python)

Fixed submission:
N=int(input())
cnt=0
while N>0:
  N//=2
  cnt=cnt*2+1
print(cnt)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
L=list(map(int,input().split()))
L=sorted(L)
if K==0:
  print(sum(L))
else:
	print(sum(L[:-K]))

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
L=list(map(int,input().split()))
L=sorted(L)
print(sum(L[:K]))

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
L=list(map(int,input().split()))
L=sorted(L)
sum(L[:K])

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
L=list(map(int,input().split()))
sum(list(sorted(L))[:K])
Problem p02797 (python)

Fixed submission:
N, K, S = map(int, input().split())
ans = [S] * K
if S==10**9:
  for _ in range(N-K):
    ans.append(1)
else:
  for _ in range(N-K):
    ans.append(S+1)
print(" ".join(map(str, ans)))

Buggy submission (verdict: Runtime Error):
N, K, S = map(int, input().split())
ans = [S] * K
if S==10*9:
  for _ in range(N-K):
    ans.append(1)
else:
	for _ in range(N-K):
    	ans.append(S+1)
print(" ".join(map(str, ans)))