Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
K,X=map(int,input().split)
if 500*K<X:
  print("No")
else:
  print("Yes")

Fixed submission:
K,X=map(int,input().split())
if 500*K>=X:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
list[1,2,3]
list.remove(A)
list.remove(B)
print(list[0])

Fixed submission:
A=int(input())
B=int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==1:
  print(2)
elif A==1 and B==3:
  print(2)
elif A==2 and B==1:
  print(3)
elif A==3 and B==2:
  print(1)

Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
list["1","2","3"]
list.remove(A)
list.remove(B)
print(list[0])

Fixed submission:
A=int(input())
B=int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==1:
  print(2)
elif A==1 and B==3:
  print(2)
elif A==2 and B==1:
  print(3)
elif A==3 and B==2:
  print(1)

Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
list["1","2","3"]
list.remove(A)
list.remove(B)
print(list(0))

Fixed submission:
A=int(input())
B=int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==1:
  print(2)
elif A==1 and B==3:
  print(2)
elif A==2 and B==1:
  print(3)
elif A==3 and B==2:
  print(1)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>=2B:
  print(A-2B)
else:
  print(0)

Fixed submission:
A,B=map(int,input().split())
if A<=B*2:
  print(0)
else:
  print(A-B*2)
Buggy python submission (verdict: Runtime Error):
N=int(input())
x=N//2
print(X/N)

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

Buggy python submission (verdict: Runtime Error):
N=int(input())
x=a//2
print(X/a)

Fixed submission:
N=int(input())
x=(N+1)//2
print(x/N)
Buggy python submission (verdict: Runtime Error):
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)]%3)

Fixed submission:
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])

Buggy python submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[(list.index(S)+1)]%3)

Fixed submission:
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])

Buggy python submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[list.index((S)+1)])

Fixed submission:
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])

Buggy python submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[S])

Fixed submission:
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])
Buggy python submission (verdict: Runtime Error):
N=int(input())
l=list(map(int,input().split()))
a=l.sort()
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
a=list(range(1,N+1))
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
N=int(input())
l=list(map(int,input().split()))
a=l.sort()
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
a=list(range(1,N+1))
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
N=list(input())
for i,j in range(N):
  N[i],N[j]=N[j],N[i]
  if N==N.sort():
    print("YES")
    break
else:
  print("NO")

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
a=list(range(1,N+1))
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
N=list(input())
for i,j in range(N):
  N2=N[i],N[j]=N[j],N[i]
  if N2==N.sort():
    print("YES")
    break
else:
  print("NO")
  

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
a=list(range(1,N+1))
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
r=int(input())
print(3(r**2))

Fixed submission:
r=int(input())
print(3*(r**2))

Buggy python submission (verdict: Runtime Error):
r=int(input())
print(3(r**2))

Fixed submission:
r=int(input())
print(3*(r**2))

Buggy python submission (verdict: Runtime Error):
r=int(input())
print(3r**2)

Fixed submission:
r=int(input())
print(3*(r**2))
Buggy python submission (verdict: Runtime Error):
N,D=list(map(int,input().split()))
print(N//(1+2D))

Fixed submission:
N,D=list(map(int,input().split()))
if N%(1+2*D)==0:
  print(N//(1+2*D))
else:
  print(N//(1+2*D)+1)

Buggy python submission (verdict: Runtime Error):
N,D=list(map(int,input().split()))
print(N//(1+2D))

Fixed submission:
N,D=list(map(int,input().split()))
if N%(1+2*D)==0:
  print(N//(1+2*D))
else:
  print(N//(1+2*D)+1)
Buggy python submission (verdict: Runtime Error):
S=input()
for i in range(3):
  if S[i]=S[i+1]:
    print("Bad")
    break
else:
  print("Good")

Fixed submission:
S=input()
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Buggy python submission (verdict: Runtime Error):
S=input()
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")

Fixed submission:
S=input()
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Buggy python submission (verdict: Runtime Error):
S=int(input())
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")
  

Fixed submission:
S=input()
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Buggy python submission (verdict: Runtime Error):
S=int(input())
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')


Fixed submission:
S=input()
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')
Buggy python submission (verdict: Runtime Error):
A,B=int(input())
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)

Fixed submission:
A,B=list(map(int,input().split()))
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
n,m=map(int, input().split())
print(n*(n-1)//2+m(m-1)//2)

Fixed submission:
n,m=map(int,input().split())
print(n*(n-1)//2+m*(m-1)//2)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
price = (a // 0.09)+1
while (price * 0.08) => a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')


Fixed submission:
a, b = map(int, input().split())
for i in range(1002):
    if (i*0.08)//1==a and (i*0.1)//1==b:
        print(i)
        exit()
print('-1')
Buggy python submission (verdict: Runtime Error):
list = input().split()
n = len(list)

mae = [list[m] for m < n/2 ]

ushiro = [list[m] for m > n/2 ]

ema = [mae[n/2 - p] for p < n/2 ]

oroshi = [ushiro[-n/2 + p] for p > n/2 ]

if mae = ema and ushiro = oroshi:
  print(Yes)
  
else:
  print(No)


Fixed submission:
li = input().split()
li[0] = int(li[0])  
li[1] = int(li[1])  
  
print( int(li[0]*(li[0]-1)/2 + li[1]*(li[1]-1)/2 ))

Buggy python submission (verdict: Runtime Error):
li = input().split()
 
print( li[0](li[0]-1)/2 + li[1](li[1]-1)/2 )

Fixed submission:
li = input().split()
li[0] = int(li[0])  
li[1] = int(li[1])  
  
print( int(li[0]*(li[0]-1)/2 + li[1]*(li[1]-1)/2 ))

Buggy python submission (verdict: Runtime Error):
li = input().split()

li[0](li[0]-1)/2 + li[1](li[1]-1)/2

Fixed submission:
li = input().split()
li[0] = int(li[0])  
li[1] = int(li[1])  
  
print( int(li[0]*(li[0]-1)/2 + li[1]*(li[1]-1)/2 ))
Buggy python submission (verdict: Runtime Error):
s = input()
vis_a = 0
vis_b = 0

for i in s:
  if i == 'A':
    vis_a = 1
  if i == 'B':
    vis_b = 1

if vis_a and vis_b:
  print("Yes")
else
  print("No")


Fixed submission:
s = input()
vis_a = 0
vis_b = 0

for i in s:
  if i == 'A':
    vis_a = 1
  if i == 'B':
    vis_b = 1

if vis_a and vis_b:
    print("Yes")
else:
    print("No")

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

for i in s:
  if s == 'A':
    vis_a = 1
  if s == 'B':
    vis_b = 1

if vis_a and vis_b:
  print("Yes")
else
  print("No")

Fixed submission:
s = input()
vis_a = 0
vis_b = 0

for i in s:
  if i == 'A':
    vis_a = 1
  if i == 'B':
    vis_b = 1

if vis_a and vis_b:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])

if a == b && b != c:
  print("Yes")
  exit()
if a == c && b != c:
  print("Yes")
  exit()
if c == b && a != c:
  print("Yes")
  exit()

print("No")

Fixed submission:
s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])

if a == b and b != c:
  print("Yes")
  exit()
if a == c and b != c:
  print("Yes")
  exit()
if c == b and a != c:
  print("Yes")
  exit()

print("No")

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

if a == b && b != c:
  print("Yes")
  exit()
if a == c && b != c:
  print("Yes")
  exit()
if c == b && a != c:
  print("Yes")
  exit()

print("No")

Fixed submission:
s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])

if a == b and b != c:
  print("Yes")
  exit()
if a == c and b != c:
  print("Yes")
  exit()
if c == b and a != c:
  print("Yes")
  exit()

print("No")
Buggy python submission (verdict: Runtime Error):
inp = str(input())
n, m = tuple(inp.split())
m_calculation = math.factorial(m)/2**(m/2)*math.factorial(m/2)
n_calculation = math.factorial(n)/2**(n/2)*math.factorial(n/2)
print(n_calculation + m_calculation)

Fixed submission:
n,m = map(int,input().split())
 
print(n*(n-1)//2+m*(m-1)//2)
Buggy python submission (verdict: Runtime Error):
palindrom = str(input())
if palindrom != palindrom[::-1]:
  return "No"
else:
  return "Yes"

Fixed submission:
s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else:
  return "Yes"

Fixed submission:
s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
	return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
	return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
	return "No"
else
	return "Yes"

Fixed submission:
s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else
	reutn "Yes"

Fixed submission:
s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import sys

n,m = input().split()
n,m = [int(n), int(m)]
num = 0
flag = 0
s = []
c = []

if m == 0:
  if n == 1:
    print(0)
    sys.exit()
    
  print(pow(10, n-1))
  sys.exit()

for i in range(m):
  s_i,c_i = input().split()
  s_i,c_i = [int(s_i), int(c_i)]
  if n >= 2 and (s_i == 1 and c_i == 0):
    print(-1)
    sys.exit()
    
  for j in range(i):
    if s[j] == s_i and c[j] != c_i:
      print(-1)
      sys.exit()
    elif s[j] == s_i and c[j] == c_i:
      flag = 1
  
  if flag == 1:
    continue
    
  s.append(s_i)
  c.append(c_i)
  
  num += c_i * pow(10, n-s_i)
  
print(num)

Fixed submission:
import sys

n,m = input().split()
n,m = [int(n), int(m)]
num = 0
flag = 0
s = []
c = []

if m == 0:
  if n == 1:
    print(0)
    sys.exit()
    
  print(pow(10, n-1))
  sys.exit()

for i in range(m):
  s_i,c_i = input().split()
  s_i,c_i = [int(s_i), int(c_i)]
  flag = 0
  if n >= 2 and (s_i == 1 and c_i == 0):
    print(-1)
    sys.exit()
    
  for j in range(len(s)):
    if s[j] == s_i and c[j] != c_i:
      print(-1)
      sys.exit()
    elif s[j] == s_i and c[j] == c_i:
      flag = 1
  
  if flag == 1:
    continue
    
  s.append(s_i)
  c.append(c_i)
  
  num += c_i * pow(10, n-s_i)
  
  
if n >= 2 and num < pow(10, n-1):
  num += pow(10, n-1)
    
print(num)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    return int(math.factorial(n) / (math.factorial(n - r) * math.factorial(r)))
  
print(comb(N, 2)+comb(M, 2))

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    if n < r:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import math

N, M = map(int, input().split())

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    if n < r:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import math

N, M = map(int, input().split())

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, M))

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    if n < r:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))
Buggy python submission (verdict: Runtime Error):
def kaibun(s):
    for i in range(len(s)-(len(s)%2)):
        if s[i] != s[-1*i-1]:
            return False
    return True

if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
        ans = 'Yes'
    else:
        ans = 'No'
else:
    ans = 'No'

Fixed submission:
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
    if s[i] != s[-1*i-1]:
      return False
  return True

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
  	if s[i] != s[-1*i-1]:
      return False
  return True

if kaibun(s):
  s_half = s[:(len(s)-1)//2]
  if kaibun(s_half):
    ans = 'Yes'
  else:
    ans = 'No'
else:
  ans = 'No'

# 出力
print(ans)

Fixed submission:
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
    if s[i] != s[-1*i-1]:
      return False
  return True

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 入力
L = input()

print((L/3)**3)

Fixed submission:
# -*- coding: utf-8 -*-
# 入力
L = int(input())

print((L/3)**3)
Buggy python submission (verdict: Runtime Error):
from scipy.misc import comb
A,B=map(int,input().split())
print(int(round(comb(A,2))+round(comb(B,2))))

Fixed submission:
from scipy.misc import comb
import numpy as np
A,B=map(int,input().split())
print(int(np.round(comb(A,2))+np.round(comb(B,2))))
Buggy python submission (verdict: Time Limit Exceeded):
N,A,B=map(int,input().split())
count=0
while N>0:
  for i in range(A):
    if N>0:
      count+=1
      N-=1
    else:
      break
  for i in range(B):
    if N>0:
      N-=1
    else:
      break
print(count)

Fixed submission:
N,A,B=map(int,input().split())
a=int(N//(A+B))
b=N%(A+B)
if b>A:
  b=A
print(A*a+b)
Buggy python submission (verdict: Runtime Error):
N=int(input())
dis_list=[list(map(int, input().split())) for  in range(N)]
ans=0
for x1,y1 in dis_list:
  for x2,y2 in dis_list:
    ans += ((x1-x2)**2+(y1-y2)**2)**0.5
print(ans/N)

Fixed submission:
N=int(input())
dis_list=[list(map(int, input().split())) for _ in range(N)]
ans=0
for x1,y1 in dis_list:
  for x2,y2 in dis_list:
    ans += ((x1-x2)**2+(y1-y2)**2)**0.5
print(ans/N)
Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
c=0
t=True
i=math.ceil(math.sqrt(N)/2)
while t:
  j=i
  while j>0:
    if i*j==N:
      c=i+j-2
      t=False
      break
    j-=1
  i+=1
print(c)

Fixed submission:
N=int(input())
for i in range(int(N**0.5),0,-1):
  if N%i==0:
    d=int(N//i)
    break
print(i+d-2)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N=int(input())
A=np.array(list(map(int, input().split())))
l=[]
for _ in range(N):
  l.append(str(A.argmin()+1))
  A[A.argmin()]=N+1
print(" ".join(l))

Fixed submission:
import numpy as np
_=int(input())
A=np.array(list(map(int, input().split())))
B=np.argsort(A)
B=B+1
B=B.tolist()
B=map(str, B)
C=' '.join(B)
print(C)
Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=v
  v=[(v1[0]+v1[1])/2]
  v.extend(v[2:])
print(sum(v)/2)

Fixed submission:
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=v
  v=[(v1[0]+v1[1])/2]
  v.extend(v1[2:])
print(sum(v)/2)

Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=[(v[0]+v[1])/2]
  v1.extend(v[2:])
  v=v1
print(sum(v1)/2)

Fixed submission:
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=v
  v=[(v1[0]+v1[1])/2]
  v.extend(v1[2:])
print(sum(v)/2)

Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=[(v[0]+v[1])/2]
  v1.extend(v[2:])
  v=v1
print(sum(v1)/2)

Fixed submission:
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=v
  v=[(v1[0]+v1[1])/2]
  v.extend(v1[2:])
print(sum(v)/2)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
s=[sorted(input()) for _ in range(N)]
m=0
for i in range(N):
  c=s.count(s[i])
  if c>1:
    m+=c-1
    s[i]=[]
print(m)

Fixed submission:
N=int(input())
c_dict={}
c=0
for i in range(N):
  s=sorted(input())
  s=''.join(s)
  if s in c_dict.keys():
    c_dict[s]+=1
    c+=c_dict[s]-1
  else:
    c_dict[s]=1
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
s=[sorted(input()) for _ in range(N)]
m=0
for i in range(N):
  c=s.count(s[i])
  if c>1:
    m+=c-1
  s[i]=[]
print(m)

Fixed submission:
N=int(input())
c_dict={}
c=0
for i in range(N):
  s=sorted(input())
  s=''.join(s)
  if s in c_dict.keys():
    c_dict[s]+=1
    c+=c_dict[s]-1
  else:
    c_dict[s]=1
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
H=list(map(int, input().split()))
c=0
for i in range(N-1):
  if H[i]-min(H[i+1:])>1:
    c=1
    break
print('Yes' if c==0 else 'No')

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
for i in range(N-1):
  if H[N-i-2]-H[N-i-1]==1:
    H[N-i-2]-=1
  elif H[N-i-2]-H[N-i-1]>1:
    print('No')
    exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
N=int(input())
H=list(map(int, input().split()))
c=0
s=[H[i]-H[i+1] for i in range(N-1)]
for i in range(N-2):
  if H[i]-H[i+2]>1:
    c=1
if N==2 and (H[0]-H[1])>1:
  c=1
if max(s)>1:
  c=1
print('Yes' if c==0 else 'No')

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
for i in range(N-1):
  if H[N-i-2]-H[N-i-1]==1:
    H[N-i-2]-=1
  elif H[N-i-2]-H[N-i-1]>1:
    print('No')
    exit()
print('Yes')
Buggy python submission (verdict: Runtime Error):
N=int(input())
p=list(map(int, input().split()))
s = [x for x in range(1,N+1) if x!=p[x-1]]
if len(s)<3:
  print("YES")
else:
  print("NO")

Fixed submission:
A,B=map(int,input().split())
print((A+B)//2 if (A+B)%2==0 else 'IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for _ in range(N)]
print(max(A[1:]))
for i in range(1,N-1):
  a=A[:i]
  a.extend(A[i+1:])
  print(max(a))
if N>1:
  print(max(A[:N-1]))

Fixed submission:
N=int(input())
A=[int(input()) for _ in range(N)]
c=0
m=0
for i in range(N):
  if m<A[i]:
    m=A[i]
    d=i
B=A
B[d]=0
for i in range(N):
  if i==d:
    print(max(B))
  else:
    print(m)
Buggy python submission (verdict: Runtime Error):
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(N) if sum(L[:x])<=X]
if N>=len(s):
  print(len(s))
else:
  print(N+1)

Fixed submission:
X,A=map(int, input().split())
print(0 if X<A else 10)
Buggy python submission (verdict: Runtime Error):
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(N) if sum(L[:x])<=X]
if n>=len(s):
  print(len(s))
else:
  print(N+1)

Fixed submission:
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(len(L)+1) if sum(L[:x])<=X]
if N+1>=len(s):
  print(len(s))
else:
  print(N+1)
Buggy python submission (verdict: Runtime Error):
import math
N,K=map(int,input().split())
m=0
for i in range(1,N+1):
  if i<K:
    temp=math.ceil(math.log2(K/i))
    m+=(1/2)**temp
  else:
    ans+=1
print(m/N)

Fixed submission:
import math
N,K=map(int,input().split())
m=0
for i in range(1,N+1):
  if i<K:
    temp=math.ceil(math.log2(K/i))
    m+=(1/2)**temp
  else:
    m+=1
print(m/N)
Buggy python submission (verdict: Runtime Error):
N=int(input())
vs=list(map(int, input().split()))
cs=list(map(int, input().split()))
s=[v-c for v,c in zip(vs,cs) if v-c>0]
print(sum(s))

Fixed submission:
A,B,T=map(int, input().split())
print((T//A)*B)