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

Fixed submission:
import math
N,K = map(int, input().split())
if K == 1:
    print(1)
else:
    P = max(0,(N-(K-1))/N)
    t = 0
    for i in range(1,min(N+1,K)):
        foo = math.log2(K/i)
        x=math.ceil(foo)
        t+=(1/2)**x
    P+=t*(1/N)
    print(P)

Buggy submission (verdict: Runtime Error):
import math
N, K = [int(i) for i in input().split()]
n = []
k = K
res = 0
while k!=1:
    n.append(k)
    k = math.ceil(k/2)

for i in range(len(n)):
    if N >= n[i]:
        res += (N-n[i]+1)/2**i
        o = i
        break

while o < len(n) - 1:
    res += (n[o] - n [o + 1]) / 2 ** (o + 1)
    o += 1
 
res = res / N
print(res)

Buggy submission (verdict: Runtime Error):
import math
N, K = [int(i) for i in input().split()]
n = [K]
k = K
while True:
    k /= 2
    n.append(math.ceil(k))
    if math.ceil(k)==1:break

n.reverse()
ma=[(1/2)**i for i in range(len(n))]
t=[]
m=len(n)
for i,(j,k) in enumerate(zip(n[1:],n)):
    t+=[ma[m-i-1]]*(j-k)
if N>K:t+=[1]*(N-K+1)
else: t=t[:N]
print("{:9f}".format(math.fsum(t)/len(t)))
Problem p03061 (python)

Fixed submission:
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
gcda = [A[0]]
gcdb = [A[-1]]
for i in range(N-2):
    gcda.append(gcd(gcda[-1],A[i+1]))
    gcdb.append(gcd(gcdb[-1],A[-(i+2)]))
gcdb.reverse()
GC = [gcdb[0]]
for i in range(N-2):
    GC.append(gcd(gcda[i],gcdb[i+1]))
else:
    GC.append(gcda[-1])
print(max(GC))

Buggy submission (verdict: Runtime Error):
from math import gcd
N = int(input())
A = list(map(int,input().split()))
gcda = [A[0]]
gcdb = [A[-1]]
for i in range(N-2):
    gcda.append(gcd(gcda[-1],A[i+1]))
    gcdb.append(gcd(gcdb[-1],A[-(i+2)]))
gcdb.reverse()
GC = [gcdb[0]]
for i in range(N-2):
    GC.append(gcd(gcda[i],gcdb[i+1]))
else:
    GC.append(gcda[-1])
print(max(GC))

Buggy submission (verdict: Runtime Error):
import math
def gcd(a,b):
    if a == 0 or b == 0:
        return max(a,b)
    else:
        return math.gcd(a,b)


N = int(input())
A = [int(i) for i in input().split()]

L = [0]
R = [0]
for i in range(N):
    L.append(gcd(L[-1],A[i]))
    R = [gcd(R[0],A[N-1-i])] + R
M = [gcd(i,j) for i,j in zip(L[:-1],R[1:])]
print(max(M))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)
N = int(input())
A = [int(i) for i in input().split()]
if N>2:
    GCD = [gcd(*[e for s,e in enumerate(A) if s!=i]) for i in range(N)]
    print(max(GCD))
else:print(math.gcd(*A))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)
N = int(input())
A = [int(i) for i in input().split()]
GCD = [gcd(*[e for s,e in enumerate(A) if s!=i]) for i in range(N)]
print(max(GCD))
Problem p03086 (python)

Fixed submission:
S = "".join([i if i in 'ACGT' else ' ' for i in input()])
print(max([len(i) for i in S.split()]+[0]))

Buggy submission (verdict: Runtime Error):
S = "".join([i if i in 'ACGT' else ' ' for i in input()])
print(max([len(i) for i in S.split()]))
Problem p03168 (python)

Fixed submission:
import sys

#TODO: Find a better DP solution
#Current is just a recursive solution
#Time complexity of recursive solutions?

class Solution(object):
	def __init__(self):
		self.n = 0
		self.p = []
		self.result = 0

	def readInput(self):
		self.n = int(sys.stdin.readline())
		a = sys.stdin.readline().split()
		for i in xrange(self.n):
			self.p.append(float(a[i]))
		#print self.p

	def coinTossRec(self, idx, tail_count, prob):
		if idx == self.n - 1:
			#last index
			self.result += (prob * self.p[idx])
			if tail_count != 0:
				#Check for head
				self.result += (prob * (1-self.p[idx]))
		else:
			self.coinTossRec(idx+1, tail_count, prob * self.p[idx])
			if tail_count != 0:
				self.coinTossRec(idx+1, tail_count-1, prob * (1-self.p[idx]))

	def coinTossIter(self):
		dp = [0] * (self.n + 1) #i is the probability of i heads so far
		dp[0] = 1
		for i in xrange(self.n):
			p_heads = self.p[i]
			for j in xrange(i+1, -1, -1):
				if j == 0:
					dp[j] = dp[j] * (1 - p_heads)
				else:
					dp[j] = dp[j-1] * p_heads + dp[j] * (1- p_heads)
		ans = 0
		for i in xrange((self.n//2) + 1, self.n+1):
			ans += dp[i]

		print ans

	def coinToss(self):
		tail_count = self.n // 2 if self.n %2 == 1 else self.n //2 - 1
		self.coinTossRec(0, tail_count, 1)
		print self. result		


if __name__ == '__main__':
	s = Solution()
	s.readInput()
	s.coinTossIter()

Buggy submission (verdict: Runtime Error):
import sys

class Solution(object):
	def __init__(self):
		self.n = 0
		self.p = []
		self.result = 0
	def readInput(self):
		self.n = int(sys.stdin.readline())
		a = sys.stdin.readline().split()
		for i in xrange(self.n):
			self.p.append(float(a[i]))
		#print self.p

	def coinTossRec(self, idx, tail_count, prob):
		if idx == self.n - 1:
			#last index
			self.result += (prob * self.p[idx])
			if tail_count != 0:
				#Check for head
				self.result += (prob * (1-self.p[idx]))
		else:
			self.coinTossRec(idx+1, tail_count, prob * self.p[idx])
			if tail_count != 0:
				self.coinTossRec(idx+1, tail_count-1, prob * (1-self.p[idx]))


	def coinToss(self):
		tail_count = self.n // 2 if self.n %2 == 1 else self.n //2 - 1
		self.coinTossRec(0, tail_count, 1)
		print self. result		


if __name__ == '__main__':
	s = Solution()
	s.readInput()
	s.coinToss()
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
inp = list(map(int, input().split()))
length = len(inp)
ans = 0
curr_max = 0
for i in range(-1,-length,-1):
    if inp[i] <= inp[i-1]:
        ans += 1
        if ans > curr_max:
            curr_max = ans
    else:
        ans = 0
print(curr_max)
Problem p03720 (python)

Fixed submission:
# ==================================================== #
# -*- coding: utf-8 -*
n, m = map(int, input().split())
arr = [0] * 114514

for i in range(m):
    a, b = map(int, input().split())
    arr[a-1] += 1
    arr[b-1] += 1

for i in range(n):
    print(arr[i])

Buggy submission (verdict: Runtime Error):
# ==================================================== #
# -*- coding: utf-8 -*
n, m = map(int, input().split())

arr = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    arr[a] += 1
    arr[b] += 1
for i in range(n):
    print(arr[i])
Problem p02947 (python)

Fixed submission:
N = int(input())
S = list(''.join(sorted(str(input()))) for _ in range(N))

dic = {}
ans = 0

for s in S:
    if not s in dic:
        dic[s] = 1
    else:
        ans += dic[s]
        dic[s] += 1
print(ans)

Buggy submission (verdict: Runtime Error):
from scipy.special import comb

N = int(input())
S = list(''.join(sorted(str(input()))) for _ in range(N))
unique_S = list(set(S))

ans = 0
for s in unique_S:
    n = S.count(s)
    if n > 1:
        ans += comb(n, 2, exact=True)
print(ans)

Buggy submission (verdict: Runtime Error):
from math import factorial

N = int(input())
S = list(''.join(sorted(str(input()))) for _ in range(N))
unique_S = list(set(S))

ans = 0
for s in unique_S:
    n = S.count(s)
    if n > 1:
        ans += factorial(n) / factorial(2) / factorial(n - 2)
print(int(ans))
Problem p02995 (python)

Fixed submission:
A, B, C, D = map(int, input().split())


def gcd(x, y):
    while x % y > 0:
        x, y = y, x % y
    return y


def lcm(x, y):
    return (x * y) // gcd(x, y)


num1 = B // C - (A - 1) // C
num2 = B // D - (A - 1) // D
num3 = B // lcm(C, D) - (A - 1) // lcm(C, D)


print(B - A + 1 - (num1 + num2 - num3))

Buggy submission (verdict: Runtime Error):
import math

A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))

Buggy submission (verdict: Runtime Error):
import math

A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))

Buggy submission (verdict: Runtime Error):
import math

A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))
Problem p03361 (python)

Fixed submission:
H, W = map(int, input().split())
campus = list(input() for i in range(H))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
campus = list(input() for i in range(W))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
campus = list(input() for i in range(W))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')
Problem p04030 (python)

Fixed submission:
s = input()

pos = s.find('B')
while pos > -1:
    if pos == 0:
        s = s[1:]
    elif pos == len(s) - 1:
        s = s[0:pos - 1]
    else:
        s = s[0:pos - 1] + s[pos + 1:]
    pos = s.find('B')
print(s)

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

for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)

Buggy submission (verdict: Runtime Error):
for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)
Problem p02988 (python)

Fixed submission:
n = int(input())

ls = list(map(int, input().split()))
 
count = 0

for i in range(1,n-1):
    if ls[i-1] < ls[i] and ls[i+1] > ls[i]:
        count+=1
    elif ls[i-1] > ls[i] and ls[i+1] < ls[i]:
            count += 1

print(str(count))

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

ls = list(map(int, input().split()))
 
count = 0

for i in range(n-2):
    if a[i-1] < a[i] and a[i+1] > a[i]:
        count+=1
    else:
        if a[i-1] > a[i] and a[i+1] < a[i]:
            count += 1

print count
Problem p03076 (python)

Fixed submission:
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)


if list2 != []:
    time = time - 10 + min(list2)
    print int(time)
else:
    print int(time)

Buggy submission (verdict: Runtime Error):
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)

time = time - 10 + min(list2)
print int(time)

Buggy submission (verdict: Runtime Error):
# coding = utf-8
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)

time = time -10 + min(list2)
print int(time)

Buggy submission (verdict: Runtime Error):
# coding = utf-8
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q + 10
    if mod != 0:
        list2.append(mod)

time = time -10 + min(list2)
print int(time)
Problem p03086 (python)

Fixed submission:
# coding: utf-8
str_S = raw_input()

list_S = list(str_S)
list = list(str_S)

list_number = []

while list != []:
    number = 0
    for char in list:
        if char == 'A' or char == 'C' or char == 'G' or char == 'T':
            number += 1
        else:
            break
    list_number.append(number)

    for n in range(number + 1):
        if list != []:
            list.pop(0)

print max(list_number)

Buggy submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

list_S2 = list_S

for char in list_S:
    number = 0
    list_S2.remove(char)

    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        number += 1
        for n in list_S2:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break
    else:
        list_number.append(0)


print int(max(list_number))

Buggy submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

list_S2 = list_S

for char in list_S:
    number = 0
    list_S2.remove(char)

    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        number += 1
        for n in list_S2:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break


print int(max(list_number))

Buggy submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

for char in list_S:
    number = 0
    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        index = list_S.index(char) + 1
        number += 1
        for n in list_S[index:]:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break


print int(max(list_number))
Problem p03101 (python)

Fixed submission:
HW = raw_input().split()
hw = raw_input().split()

print(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))

Buggy submission (verdict: Runtime Error):
HW = raw_input().split()
hw = raw_input().split()

printint(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))

Buggy submission (verdict: Runtime Error):
HW = raw_input().split()
hw = raw_input().split()

print HW[0] * HW[1] - hw[0] * HW[1] - hw[1] * HW[0] + hw[0] * hw[1]
Problem p03105 (python)

Fixed submission:
list = raw_input().split()

A = int(list[0])

B = int(list[1])

C = int(list[2])

if B // A < C:
    print B // A

else:
    print C

Buggy submission (verdict: Runtime Error):
list = raw_input().split()

A = int(list[0])

B = int(list[1])

c = int(list[2])

if B // A < C:
    print B // A

else:
    print C

Buggy submission (verdict: Runtime Error):
list = raw_input().split()

A = list[0]

B = list[1]

c = list[2]

if B // A < C:
    print B // A

else:
    print C
Problem p02898 (python)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = [int(a) for a in input().split()]
ans = 0
for i in range(N):
  if h[i] >= K:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = [int(a) for a in input().split]
ans = 0
for i in range(N):
  if h[i] >= K:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = str(input())
ans = 0
for i in range(N):
  if int(h.split()[i]) >= K:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  h = int(input())
  if h >= K:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  if int(input()) >= K:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  if input() >= K:
    ans += 1
    
print(ans)
Problem p03316 (python)

Fixed submission:
S = input()
inputInInt = int(S)
sum = 0
for i, v in enumerate(S):
    sum += int(v)

if inputInInt % sum is 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
S = input()
inputInInt = int(S)
sum = 0
for i in range(S):
    sum += S[i]

if inputInInt % sum is 0:
    print('YES')
else:
    print('No')
Problem p02911 (python)

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

points = []
for x in range(N):
    points.append(K-Q)

for y in range(Q):
    ansed = int(input()) - 1
    points[ansed] += 1

for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
ansed = []
for x in range(0,Q):
    ansed.append(int(input()))
for y in range(1,N+1):
    if K - Q + ansed.count(y) > 0:
        print("Yes")
    else:
        print("No")
Problem p02957 (python)

Fixed submission:
inp = input().split(" ")
a = int(inp[0])
b = int(inp[1])
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):

inp = input().split(" ")
a = inp[0]
b = inp[1]
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(ans)
else:
  print("IMPOSSIBLE")

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

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)

  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(ans)
else:
  print("IMPOSSIBLE")

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

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
  ans = max(abs_a, abs_b) - (((max(abs_a, abs_b)/2) - min(abs_a, abs_b))/2)
  print(ans)
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
  ans = max(abs_a, abs_b) - (((max(abs_a, abs_b)/2) - min(abs_a, abs_b))/2)
  print(ans)
else:
  print("IMPOSSIBLE")
Problem p02969 (python)

Fixed submission:
r = int(input())

print(r**2*3)

Buggy submission (verdict: Runtime Error):
print(r**2*3)
Problem p02971 (python)

Fixed submission:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
           
s = sorted(l, reverse=True)
      
for value in l:
    if value == s[0]:
        print(s[1])
    else:
        print(s[0])

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
    print(max(l[:j]+l[j+1:]))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
    print(max(l[:i]+l[i+1:]))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
	print(max(l[:i]+l[i+1:]))
Problem p03067 (python)

Fixed submission:
a, b, c = map(int, input().split())
ans = "No"
if a < c and c < b or b < c and c < a:
    ans = "Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
S = input()
b = 0
w = S.count('.')
res = w
for s in S:
	if s == '.':
		w -= 1
	else:
		b += 1
	res = min(res,b+w)
print(res)
Problem p03162 (python)

Fixed submission:
n = int(input())
A = [list(map(int, input().split())) for i in range(n)]


dp = [['' for i in range(3)] for j in range(n)]
for i in range(n):
    if(i == 0):
        dp[i] = A[i]
        continue
    for j in range(3):
        if(j ==0):
            dp[i][j] = max(dp[i-1][1], dp[i-1][2])+A[i][j]
        elif(j ==1):
            dp[i][j] = max(dp[i-1][0], dp[i-1][2])+A[i][j]
        elif(j ==2):
            dp[i][j] = max(dp[i-1][0], dp[i-1][1])+A[i][j]

print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
Welcome to fish, the friendly interactive shell
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py 
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
kuwanakengo@kuwanakengonoMacBook ~/python> 
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py 3
10 40 70
20 50 80
30 60 90
fish: Unknown command 10
fish: 
10 40 70
^
fish: Unknown command 20
fish: 
20 50 80
^
fish: Unknown command 30
fish: 
30 60 90
^
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
  File "test2.py", line 17
    dp[i][j] = max(dp[i-1][0], dp[i-1][1)+A[i][j]
                                        ^
SyntaxError: invalid syntax
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
3
[[10, 40, 70], [20, 50, 80], [30, 60, 90]]
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
Traceback (most recent call last):
  File "test2.py", line 18, in <module>
    print(mas(dp[n]))
NameError: name 'mas' is not defined
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
Traceback (most recent call last):
  File "test2.py", line 18, in <module>
    print(max(dp[n]))
IndexError: list index out of range
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
[[10, 40, 70], [90, 120, 120], [150, 180, 210]]
kuwanakengo@kuwanakengonoMacBook ~/python> python3 test2.py
3
10 40 70
20 50 80
30 60 90
210
kuwanakengo@kuwanakengonoMacBook ~/python>
Problem p03206 (python)

Fixed submission:
N= input()
 
if(N == "25") : 
	print('Christmas')
if(N == "24") : 
	print("Christmas Eve")
if(N == "23") : 
	print("Christmas Eve Eve")
if(N == "22") : 
	print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
N = input()

if(N = 25) : 
	print("Christmas")
if(N = 24) : 
	print("Christmas Eve")
if(N = 23) : 
	print("Christmas Eve Eve")
if(N = 22) : 
	print("Christmas Eve Eve Eve")