Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from collections import Counter
num = int(input())
value = [input() for i in range(num)]
votes = Counter(value)
dict = {}

for value in votes.values():
    dict[value] = []

for (key, value) in votes.iteritems():
    dict[value].append(key)
maxVote = sorted(dict.keys(), reverse=True)[0]
if len(dict[maxVote]) > 1:
    print(sorted(dict[maxVote])[0])
else:
    print(dict[maxVote][0])

Fixed submission:
from collections import Counter
num = int(input())
value = [input() for i in range(num)]
votes = Counter(value)
dict = {}

for value in votes.values():
    dict[value] = []

for (key, value) in votes.items():
    dict[value].append(key)
maxVote = sorted(dict.keys(), reverse=True)[0]
list_data = dict[maxVote]
list_data.sort()
for i in list_data:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
value = [input() for i in range(num)]
string_count = list(set(value))
string_count.sort()
number = 0
list_data = list()
for data in string_count:
    if number == value.count(data):
        list_data.append(data)
    elif number < value.count(data):
        number = value.count((data))
        list_data = []
        list_data.append(data)

for i in list_data:
    print(i)

Fixed submission:
from collections import Counter
num = int(input())
value = [input() for i in range(num)]
votes = Counter(value)
dict = {}

for value in votes.values():
    dict[value] = []

for (key, value) in votes.items():
    dict[value].append(key)
maxVote = sorted(dict.keys(), reverse=True)[0]
list_data = dict[maxVote]
list_data.sort()
for i in list_data:
    print(i)
Buggy python submission (verdict: Runtime Error):
x, y = input(), input()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 or int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Fixed submission:
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)
Buggy python submission (verdict: Runtime Error):
h, n = map(int, input().split())

a = [map(int, input().split()) for _ in range(n)]

h -= sum(a)
if h <= 0:
    print('Yes')
else:
    print('No')

Fixed submission:
h, n = map(int, input().split())
a = [int(x) for x in input().split()]

h -= sum(a)

if h <= 0:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
h, n = map(int, input().split())

a = [map(int, input().split()) for _ in range(n)]
print(a)
for i in a:
    h -= a
if h <= 0:
    print('Yes')
else:
    print('No')


Fixed submission:
h, n = map(int, input().split())
a = [int(x) for x in input().split()]

h -= sum(a)

if h <= 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())

h = [int(x) for x in input().split()]
sorted_h = sorted(h, reverse=True)

for i in range(k):
    if len(sorted_h) > 0:
        sorted_h.pop(0)
    else:
        break
print(sum(sorted_h))


Fixed submission:
n, k = map(int, input().split())

h = [int(x) for x in input().split()]

if len(h) <= k:
    print(0)
else:
    sorted_h = sorted(h, reverse=True)
    print(sum(sorted_h[k:]))
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split(' '))

for i in range(k):
    if a != 0:
        a -= 1
    elif b != 0:
        b -= 1

print(a, b)

Fixed submission:
a, b, k = map(int, input().split(' '))

if a != 0 or b != 0:
    if k >= a:
        k -= a
        a = 0
        b = b - k if k <= b else 0
    else:
        a -= k
print(a, b)
Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())

total = 0

rewards = {1: 300000, 2: 200000, 3: 100000}

x1 = rewards[x]
y2 = rewards[y]

if (x == 1 and y ==  1):
  	total += 400000
total += (x1 + y1)

print(total)


Fixed submission:
x, y = map(int, input().split(" "))
 
total = 0
 
rewards = {1: 300000, 2: 200000, 3: 100000}

x1 = rewards[x] if (x <= 3) else 0
y1 = rewards[y] if (y <= 3) else 0
 
if (x == 1 and y ==  1):
  total += 400000
if (x1 != None):
  total += x1
if (y1 != None):
  total += y1
 
print(total)

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

if(a == 1 & b == 1)
	pass

Fixed submission:
x, y = map(int, input().split(" "))
 
total = 0
 
rewards = {1: 300000, 2: 200000, 3: 100000}

x1 = rewards[x] if (x <= 3) else 0
y1 = rewards[y] if (y <= 3) else 0
 
if (x == 1 and y ==  1):
  total += 400000
if (x1 != None):
  total += x1
if (y1 != None):
  total += y1
 
print(total)
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())
    kv = collections.defaultdict(int)
    max_cnt = 0
    res = []
    for _ in range(N):
        word = input()
        kv[word] += 1
        if kv[word] == max_cnt:
            res.append(word)
        elif kv[word] > max_cnt:
            res = [word]
            max_cnt = kv[word]
    print('\n'.join(sorted(res)))

Fixed submission:
import collections

if __name__ == '__main__':
    N = int(input())
    kv = collections.defaultdict(int)
    max_cnt = 0
    res = []
    for _ in range(N):
        word = input()
        kv[word] += 1
        if kv[word] == max_cnt:
            res.append(word)
        elif kv[word] > max_cnt:
            res = [word]
            max_cnt = kv[word]
    for s in sorted(res):
        print(s)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
MAX = max(X)
res = []
for a in range(1, MAX):
  total = 0
  for x in X:
    kyori = (x - a) * (x - a)
    total += kyori
  res.append(total)
print(min(res))

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
P = int(sum(X) / N + 0.5)
total = 0
for x in X:
  kyori = (x - P) * (x - P)
  total += kyori
print(total)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
MAX = max(X)
res = []
for a in range(1, int(MAX)):
  total = 0
  for x in X:
    kyori = (x - a) * (x - a)
    total += kyori
  res.append(total)
print(min(res))

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
P = int(sum(X) / N + 0.5)
total = 0
for x in X:
  kyori = (x - P) * (x - P)
  total += kyori
print(total)
Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
li=[input() for _ in range(n)]
c = collections.Counter(li)
max_list = [kv[0] for kv in c.items() if kv[1] == max(c.values())]
max_list.sort()
for s in max_list:
  print(s)

Fixed submission:
import sys
li = list(map(int,input().split()))
li.sort()
if(str(li[0]) == str(li[1]) == str(li[2])):
  print("No")
  sys.exit()
if(str(li[0]) != str(li[1]) != str(li[2])):
  print("No")
  sys.exit()
for i in range(3):
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break

Buggy python submission (verdict: Runtime Error):
import sys
import collections
n = int(input())
li=[input() for _ in range(n)]
c = collections.Counter(li)
max_list = [kv[0] for kv in c.items() if kv[1] == max(c.values())]
max_list.sort()
for s in max_list:
  print(s)

Fixed submission:
import sys
li = list(map(int,input().split()))
li.sort()
if(str(li[0]) == str(li[1]) == str(li[2])):
  print("No")
  sys.exit()
if(str(li[0]) != str(li[1]) != str(li[2])):
  print("No")
  sys.exit()
for i in range(3):
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break

Buggy python submission (verdict: Runtime Error):
import sys
li = list(map(int,input().split()))
li.sort()
if(str(li[0]) == str(li[1]) == str(li[2])):
    print("No")
    sys.exit()
for i in range(3):
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break
else:
  print("No")

Fixed submission:
import sys
li = list(map(int,input().split()))
li.sort()
if(str(li[0]) == str(li[1]) == str(li[2])):
  print("No")
  sys.exit()
if(str(li[0]) != str(li[1]) != str(li[2])):
  print("No")
  sys.exit()
for i in range(3):
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break

Buggy python submission (verdict: Runtime Error):
import sys
li = list(map(int,input().split()))
li.sort()
for i in range(3):
  if(str(li[i]) == str(li[i+1]) == str(li[i+2])):
    print("No")
    sys.exit()
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break
else:
  print("No")

Fixed submission:
import sys
li = list(map(int,input().split()))
li.sort()
if(str(li[0]) == str(li[1]) == str(li[2])):
  print("No")
  sys.exit()
if(str(li[0]) != str(li[1]) != str(li[2])):
  print("No")
  sys.exit()
for i in range(3):
  if(str(li[i]) == str(li[i+1])):
    print("Yes")
    break
Buggy python submission (verdict: Runtime Error):
import sys
n = int(input())
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
while(i<n):
  if(a[i] in a[i+1:]):
    print("NO")
    sys.exit()
  i += 1
print("YES")

Fixed submission:
s, t = map(str,input().split())	
a, b = map(int,input().split())	
u = input()
if(s == u):
  a -= 1;
elif(t == u):
  b -= 1;
print("{} {}".format(a, b))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
while(i<n):
  if(a[i] in a[i+1:]):
    print("NO")
    sys.exit()
  i += 1
print("YES")

Fixed submission:
import sys
n = int(input())
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
a.sort()
while(i<n-1):
  if(a[i] == a[i+1]):
    print("NO")
    sys.exit()
  i += 1
print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
a = list(map(int,input().split()))
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")

Fixed submission:
import sys
n = int(input())
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
a.sort()
while(i<n-1):
  if(a[i] == a[i+1]):
    print("NO")
    sys.exit()
  i += 1
print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
a = list(map(int,input().split()))
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")

Fixed submission:
import sys
n = int(input())
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
a.sort()
while(i<n-1):
  if(a[i] == a[i+1]):
    print("NO")
    sys.exit()
  i += 1
print("YES")
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
X_min = min(X)
X_max = max(X)
S = []
for x in range(X_min, X_max):
    s = 0
    for i in range(N):
        s += (X[i]-x)**2
    S.append(s)
print(min(S))

Fixed submission:
N = int(input())
X = list(map(int, input().split()))
X_min = min(X)
X_max = max(X)
S = []
if X_min == X_max:
    S.append(0)
for x in range(X_min, X_max):
    s = 0
    for i in range(N):
        s += (X[i]-x)**2
    S.append(s)
print(min(S))
Buggy python submission (verdict: Runtime Error):
import math
N,M=map(int,input().split())
l = [int(s) for s in input().split()]

for i in range(M):
  math.floor(l[l.index(max(l))] = l[l.index(max(l))]/2)

p = 0
for i in range(N):
  p += l[i]
print(p)  


Fixed submission:
s = input()
 
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
elif s == 'Rainy':
    print('Sunny')

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

list = ['Sunny', 'Cloudy', 'Rainy']

for item in list:
  if (item == 'Sunny' and input == 'Sunny':
    print 'Cloudy'
  elif item == 'Cloudy' and input == 'Cloudy':
    print 'Rainy'
  elif item = 'Rainy' and input == 'Rainy':
    print 'Sunny'

Fixed submission:
s = input()
 
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
elif s == 'Rainy':
    print('Sunny')
Buggy python submission (verdict: Runtime Error):
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Fixed submission:
str = input().split(" ")

if int(str[0])-int(str[1]) >= int(str[2]):
    print(0)
else:
    print(int(str[2])-int(str[0])+int(str[1]))
Buggy python submission (verdict: Runtime Error):
str = input()
num = int(str)
numbers = len(str)
print(numbers)
con = 0
a = str[-6:0]
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers>0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Fixed submission:
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)
Buggy python submission (verdict: Runtime Error):
A, B = input().split()
a = int(A)
b = int(B)
if(a*500>=b):
  print(Yes)
else:
  print(No)

Fixed submission:
A, B = input().split()
a = int(A)
b = int(B)
if(a*500<b):
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
5
aaaaa aaaaa

Fixed submission:
n = int(input())
a ,b = input().split(" ")
s = ""
for x in range(n):
  s = s + a[x] + b[x]
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
A , B = input().split(" ")
num1 = int(A)
num2 = int(B)
lcm = num1 if(num1 > num2) else num2
while(True):
    if((lcm % num1 == 0) and (lcm % num2 == 0)):
        print(lcm)
        break
    lcm += 1

Fixed submission:
A , B = input().split(" ")
num1 = int(A)
num2 = int(B)
def gcd(num1,num2):
    if num1%num2 == 0:
        # Base case
        return num2
    else:
        # Iterative case
        return gcd(num2,num1%num2)
lcm = (num1*num2)//gcd(num1,num2)
print(lcm)

Buggy python submission (verdict: Runtime Error):
A, B= input().split(" ")
a = int(A)
b = int(B)
list = []
for x in range (1,a):
  if a%x == 0 and b%x == 0 : list.append(x)
maxDiv = max(list)
c = a/maxDiv
print(int(c*b))

Fixed submission:
A , B = input().split(" ")
num1 = int(A)
num2 = int(B)
def gcd(num1,num2):
    if num1%num2 == 0:
        # Base case
        return num2
    else:
        # Iterative case
        return gcd(num2,num1%num2)
lcm = (num1*num2)//gcd(num1,num2)
print(lcm)
Buggy python submission (verdict: Runtime Error):
from functools import reduce
N, M = list(map(int, input().split()))
ps_list = [input().split() for _ in range(M)]

result = {}
for row in ps_list:
  if not row[0] in result:
    result[row[0]] = {
        "AC": 0,
        "WA": 0
    }
  if result[row[0]]["AC"] > 0:
    continue
  else:
    result[row[0]][row[1]] = result[row[0]][row[1]] + 1

print(result)
ac = 0
wa = 0
for k,v in result.items():
  ac = ac + v["AC"]
  if v["AC"] = 0:
    continue
  wa = wa + v["WA"]
print(ac, wa)

Fixed submission:
from functools import reduce
N, M = list(map(int, input().split()))
ps_list = [input().split() for _ in range(M)]

result = {}
for row in ps_list:
  if not row[0] in result:
    result[row[0]] = {
        "AC": 0,
        "WA": 0
    }
  if result[row[0]]["AC"] > 0:
    continue
  else:
    result[row[0]][row[1]] = result[row[0]][row[1]] + 1

ac = 0
wa = 0
for k,v in result.items():
  ac = ac + v["AC"]
  if v["AC"] == 0:
    continue
  wa = wa + v["WA"]
print(ac, wa)
Buggy python submission (verdict: Time Limit Exceeded):
N= int(input())
P = [int(i) for i in input().split()] 
C = N

for i in range(N):
	if min(P[0:i+1]) != P[i]:
		C -= 1
print(C)


Fixed submission:
N= int(input())
P = [int(i) for i in input().split()] 
C = N
D = P[0]
for i in range(1, N, 1):
	D = min(D,P[i])
	if D != P[i]:
		C -= 1
print(C)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = [int(i) for i in input().split()] 
C = N
for j in range(N):
	for i in range(N):
		if i > j:
			break
		else:
			if P[j] > P[i]:
				C -= 1
				break
print(C)

Fixed submission:
N= int(input())
P = [int(i) for i in input().split()] 
C = N
D = P[0]
for i in range(1, N, 1):
	D = min(D,P[i])
	if D != P[i]:
		C -= 1
print(C)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
D = input()
S=list(D)
C = 0
X = 0
i=0
while i < N-X-1:
	if S[i]==S[i+1]:
		S.pop(i)
		i=0
		X+=1
	else:
		i+=1

print(len(S))


Fixed submission:
N = int(input())
D = input()
S=list(D)
C = 1
X = S[0]
for i in range(N-1):

	if S[i+1]!=X:
		C+=1
		X=S[i+1]

print(C)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(i) for i in input().split()] 
C = [0] * (N)
S = ""
for i in range(N):
	C[A[i]-1]=i+1

for i in range(N):
	if i == 0:
		S = str(C[i])
	else:
		S = S+" "+str(C[i])
print(S)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()] 
C = [0] * (N)

for i in range(N):
	C[A[i]-1]=i+1

print(' '.join(map(str,C)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
C=[0]*(N-1)
for i in range(N-1):
	C[i]=i+1
print(sum(C))


Fixed submission:
N = int(input())
N-=1
print(N*(N+1)//2)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
C=0
for i in range(N):
	C+=i
print(C)


Fixed submission:
N = int(input())
N-=1
print(N*(N+1)//2)
Buggy python submission (verdict: Runtime Error):
a = int(input())
S = input()

if a >= 3200:
	print(S)
else:
	print(red)

Fixed submission:
a = int(input())
S = input()

if a >= 3200:
	print(S)
else:
	print("red")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0] * (N)
for i in range(N):
	A[i] = int(input())

D=max(A)
for j in range(N):
	if A[j] != D:
		print(D)
	else:
		B = A[:]
		B.pop(j)
		print(max(B))

Fixed submission:
N = int(input())
A = [0] * (N)
for i in range(N):
	A[i] = int(input())

D=max(A)
C=sorted(A)[-2]
for j in range(N):
	if A[j] != D:
		print(D)
	else:
		print(C)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0] * (N)
for i in range(N):
	A[i] = int(input())

D=max(A)
for j in range(N):
	if A[j] != D:
		print(D)
	else:
		X = A.pop(j)
		print(max(A))
		A.insert(j,X)

Fixed submission:
N = int(input())
A = [0] * (N)
for i in range(N):
	A[i] = int(input())

D=max(A)
C=sorted(A)[-2]
for j in range(N):
	if A[j] != D:
		print(D)
	else:
		print(C)
Buggy python submission (verdict: Runtime Error):
N, L = (int(i) for i in input().split())
C = 0
S = 0

if L > 0:
	for i in range(N):
		if i > 0:
			S += L + i
elif L+N-1 < 0:
	for i in range(N):
		if i < N-1:
			S += L + i
else:
	for i in range(N):
		S += L + i

print(S)



Fixed submission:
S = input()
C = 0
for i in range(3):
	if S[i] == S[i+1]:
		C = 1

if C == 1:
	print('Bad')
else:
	print('Good')
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')



Fixed submission:
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')



Fixed submission:
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
s='Yes'
z=0

if a<c:
    if b<c:
        z=1

if a>c:
    if b>c:
        z=1

if z=1:
    print('Yes')
else:
    print('No')



Fixed submission:
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
SUM = 0
N = int(input())
for num in range(N):
	P[num] = int(input())

P.sort(reverse=True)
P[0] = P[0]//2

for num in range(N):
	SUM += P[num]

print(SUM)

Fixed submission:
S = 0
N = int(input())
P=[]
for num in range(N):
	P.append(int(input()))

P.sort(reverse=True, key=int)
P[0] = P[0]//2

for num in range(N):
	S += P[num]

print(S)

Buggy python submission (verdict: Runtime Error):
SUM = 0
N = input()
for num in range(N):
	P[num] = input()

P.sort(reverse=True)
P[0] = P[0]/2

for num in range(N):
	SUM += P[num]

print(SUM)

Fixed submission:
S = 0
N = int(input())
P=[]
for num in range(N):
	P.append(int(input()))

P.sort(reverse=True, key=int)
P[0] = P[0]//2

for num in range(N):
	S += P[num]

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

d = {}

for item in s:
    if item in d.keys():
        d[item] += 1
    else:
        d[item] = 1

m = [k for k, v in d.items() if v == max(d.values())]
m.sort()
for item in m:
    print(item)


Fixed submission:
from collections import Counter
import itertools

n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

cnt_words = Counter(s)

mode_v = cnt_words.most_common()[0][-1]
it = itertools.takewhile(
    lambda kv: kv[-1] == mode_v, cnt_words.most_common()
)
m = []
for i in it:
    m.append(i[0])
m.sort()
for item in m:
    print(item)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

d = {}

for item in s:
    if item in d.keys():
        d[item] += 1
    else:
        d[item] = 1

start = time.time()
m = [k for k, v in d.items() if v == max(d.values())]
m.sort()
for item in m:
    print(item)


Fixed submission:
from collections import Counter
import itertools

n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

cnt_words = Counter(s)

mode_v = cnt_words.most_common()[0][-1]
it = itertools.takewhile(
    lambda kv: kv[-1] == mode_v, cnt_words.most_common()
)
m = []
for i in it:
    m.append(i[0])
m.sort()
for item in m:
    print(item)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

d = {}

for item in s:
    if not item in d.keys():
        d[item] = 1
    else:
        d[item] += 1

m = [k for k, v in d.items() if v == max(d.values())]
m.sort()

for item in m:
    print(item)


Fixed submission:
from collections import Counter
import itertools

n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

cnt_words = Counter(s)

mode_v = cnt_words.most_common()[0][-1]
it = itertools.takewhile(
    lambda kv: kv[-1] == mode_v, cnt_words.most_common()
)
m = []
for i in it:
    m.append(i[0])
m.sort()
for item in m:
    print(item)