TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
print((lambda x:((x[2]-1) if x[4] == x[0] else x[2]),((x[3]-1) if x[4] == x[1] else x[3]) )(input().split()+list(map(int,input().split()))+input()))

print(' '.join((lambda x:[str((x[2]-1)) if x[4] == x[0] else str(x[2]),str((x[3]-1)) if x[4] == x[1] else str(x[3])])(input().split()+list(map(int,input().split()))+[input()])))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
[H, A] = [int(i) for i in input().split()]
t = 0
if H/A != int(H/A):
    t = 1
print(int(H/A) + t)

[S, T] = [str(i) for i in input().split()]
[A, B] = [int(i) for i in input().split()]
U = str(input())

if S == U:
    print(A-1, B)
else:
    print(A, B-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S,T,U = input().split()
A,B = map(int,input()split())
if U == S:
  A -= A
else:
  B -= B
print(A,B)

S,T,A,B,U = input().split()
A = int(A)
B = int(B)
if U == S:
  A -= 1
else:
  B -= 1
print(A,B)

S,T = map(str,input().split())
A,B = map(int,input().split())
U = input()
if S == U:
  A -= 1
else:
  B -= 1
print(A,B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if u==s:
    print('{}, {}' .format(a-1, b))
else:
    print('{}, {}'.format(a, b-1))

s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if u==s:
    print('{} {}' .format(a-1, b))
else:
    print('{} {}'.format(a, b-1))

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = input().split()
a,b = map(int,input().split())
j = input()
if s == j or t == j:
  print(a+b-1)
else:
  print(a+b)

s,t = input().split()
a,b = map(int,input().split())
j = input()
if s == j:
  a -= 1
elif t == j:
  b -= 1
print(a,b)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t=map(sting,input())
a,b=map(int,input())
u=map(sting,input())

if s==u:
    print(a-1,b)
else
    print(a,b-1)



s,t=input().split()
a,b=map(int,input().split())
u=input().split()

if s==u:
    print(a-1,b)
else:
    print(a,b-1)



s,t=map(str,input().split())
a,b=map(int,input().split())
u=input()

if s==u:
  print(a-1,b)
elif t==u:
  print(a,b-1)
  

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S=input()
word="S"
print(word.replace("S","X")*len(S))

S,T=input().split()
A,B=map(int,input().split())
U=input()
if U==S :
  print(A-1,B)
else :
  print(A,B-1)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
color = input()

kosuu = input()

trashc = input()

_ = 0

color = color.split()
kosuu = kosuu.split()
trashc = trashc.split()


while True:
  if(trashc[0] == color[_]):
    if(int(kosuu[_]) > 0):
    	answer = int(kosuu[_]) -1
    	break
    else:
      answer = 0
      break
      
  _= _+1
    
print(answer)

color = input()

kosuu = input()

trashc = input()

_ = 0

color = color.split()
kosuu = kosuu.split()
trashc = trashc.split()


while True:
  if(trashc[0] == color[_]):
    kosuu[_] = int(kosuu[_]) -1
    break
      
  _= _+1
    
print(kosuu)


color = input()

kosuu = input()

trashc = input()

_ = 0

color = color.split()
kosuu = kosuu.split()
trashc = trashc.split()


while True:
  if(trashc[0] == color[_]):
    kosuu[_] = int(kosuu[_]) -1
    break
      
  _= _+1
    
print(" ".join(map(str, kosuu)))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
def main():
	all,rolls=map(int,input().split())
	List=list(map(int,input().split()))

	sum = 0
	sumList =[]

	for i in range(all - rolls + 1):
		sum = 0
		for j in range(rolls):
			sum = sum + (List[i + j] + 1) / 2
		sumList.append(sum)

	sumList.sort(reverse=True)
	print(sumList[0])

if __name__ == '__main__':
	main()

import sys
input = sys.stdin.readline

all,rolls=map(int,input().split())
List=list(map(int,input().split()))

sum = 0
sumList =[]

for i in range(all - rolls + 1):
	sum = 0
	for j in range(rolls):
		sum = sum + (List[i + j] + 1) / 2
	sumList.append(sum)

sumList.sort(reverse=True)
print(sumList[0])

all,rolls=map(int,input().split())
List=list(map(int,input().split()))

sum = 0
sumList =[]

for i in range(all - rolls + 1):
	sum = 0
	for j in range(rolls):
		sum = sum + (List[i + j] + 1) / 2
	sumList.append(sum)

sumList.sort(reverse=True)
print(sumList[0])

a,b=input().split()
c,d=map(int,input().split())
e=input()
 
if a==e:
	c = c - 1
else:
	d = d - 1
 
print(c,d)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
ball1,ball2=map(str,input().split())
c1,c2=map(int,input().split())
x=input()
print(c1-1,c2 if x==ball1 else c1,c2-1)

b1,b2=map(str,input().split())
c1,c2=map(int,input().split())
x=input()
if x==b1:
	print(c1-1,c2)
elif x==b2:
	print(c1,c2-1)
else:
	print(c1,c2)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N, K = input().split()
P = input().split()
P.sort(reverse=True)
sum = 0
for k in range(int(K)):
  p = int(P[k])
  sum += (p / 2) + 0.5
print(sum)


S, T = input().split()
A, B = input().split()
U = input()

ans1 = int(A)
ans2 = int(B)
if S == U:
  ans1 = ans1 - 1
if T == U:
  ans2 = ans2 - 1

print(ans1, ans2)


Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == t:
  a -= 1
else:
  b -= 1
print(str(a) + " " + str(b))

s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == u:
  a -= 1
else:
  b -= 1
print(str(a) + " " + str(b))

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = map(str,input.split())
a,b = map(int,input.split())
u = str(input())
if s == u:
    a -= 1
if s == u :
    b -= 1
print("{0} {1}".format(a,b))

S,T = map(str,input.split())
A,B = map(int,input.split())
u = str(input())
if s == u:
    a -= 1
else :
    b -= 1
print("{0} {1}".format(a,b))

s,t = map(str,input.split())
a,b = map(int,input.split())
u = str(input())
if s == u:
    a -= 1
else :
    b -= 1
print("{0} {1}".format(a,b))

s, t = map(str,input.split())
a, b = map(int,input.split())
u = input()
if s == u:
    a -= 1
if t == u:
    b -= 1
print("{0} {1}".format(a,b))

s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
if s == u:
    a -= 1
elif t == u:
    b -= 1
print("{0} {1}".format(a,b))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = input().split()
a, b = list(map(int, input, split()))
u = input()
if u == s:
    print("{} {}".format(a-1, b))
else:
    print("{} {}".format(a, b-1))


print('x'*len(input()))

s, t = input().split()
a, b = list(map(int, input().split()))
u = input()
if u == s:
    print("{} {}".format(a-1, b))
else:
    print("{} {}".format(a, b-1))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())
if u == s:
    a = a-1
else :
    b = b-1
    
print("{} {}".format(s, t))
print("{} {}".format(a,b))

s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())
if u == s:
    a = a-1
   
else :
    b = b-1

print("{} {}".format(a,b))

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S, T = input().split()
A, B = map(int, input().split())
U = input()

print((A-1, B) if "S"=="U" else (A, B-1))



S, T = input().split()
A, B = map(int, input().split())
U = input()

if "S"=="U":
    print(A-1, B)
else :
    print(A, B-1)

S, T = input().split()
A, B = map(int, input().split())
U = input()

print(A-1, B if S==U else A, B-1)


S, T = input().split()
A, B = map(int, input().split())
U = input()

print( (A-1,B) if S==U else (A,B-1) )

S, T = input().split()
A, B = map(int, input().split())
U = input()

print(A-1, B if "S"=="U" else A, B-1)



S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1, B)
else :
    print(A, B-1)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = map(input().split())
a,b = map(int,input().split())
u = input()

if u == s:
  print((a-1),b)
else:
  print(a,(b-1))

s,t = input().split()
a,b = map(int,input().split())
u = input()

if u == s:
  print((a-1),b)
else:
  print(a,(b-1))


Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A, 😎

S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A)

S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A,B)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
if u == s:
  b -= 1
print(a, b)


s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
if u == t:
  b -= 1
print(a, b)


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
red blue
5 5
blue

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))


Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N, K = map(int, input().split())
p = list(map(int, input().split()))

s = 0

for j in range(K):
  s += p[j]
  
x = s

for k in range(N - K):
  t = s - p[k] + p[K + k]
  if s <= t:
    x = t
  else:
    pass
  s = t

print((x + K) / 2)

S, T = map(str, input().split())
A, B = map(int, input().split())
U = str(input())

if S == U:
  print(A-1, B)
else:
  print(A, B-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = map(input().split())
a,b = map(int,input().split())
u = input()

if s == u:
    print(a-1,b)
else:
    print(a,b-1)

s,t = input().split()
a,b = map(int,input().split())
u = input()
if s == u:
    print(a-1,b)
else:
    print(a,b-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(str,input().split())
a, b = map(int,input().split())
u = input()

if s == u:
  a -= a
else:
  b -=b

print(a, b, sep='\t')



print(S)

s, t = map(str,input().split())
a, b = map(int,input().split())
u = input()
 
if s == u:
	print(a-1, b)
else:
	print(a, b-1)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a,b=input().split()
n,m=map(int,input().split())
c=input()
if a==c:
    print(a-1,b)
else:
    print(a,b-1)

a,b=input().split()
n,m=map(int,input().split())
c=input()
if a==c:
    print(n-1,m)
else:
    print(n,m-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
str1, str2 = input().split()
num1, num2 = map(int,input.split())
trim = input()

if trim == str1:
	num1 = num1 - 1
else:
  	num2 = num2 - 1

print("%d %d",%(num1, num2))


str1, str2 = input().split()
num1, num2 = map(int,input.split())
trim = input()
 
if trim == str1:
	num1 = num1 - 1
else:
  	num2 = num2 - 1
 
print("%d %d",%(num1, num2))

num = input()
list = list(map(int,input().split()))
flg  = False
for i in list:
  if list.count(i) >= 2:
  	flg = True
    break
print("NO") if flg else print("YES")


str1, str2 = input().split()
num1, num2 = map(int,input.split())
trim = input()
 
if trim == str1:
	num1 = num1 - 1
else:
  	num2 = num2 - 1
 
print("%d %d",%(num1, num2))

str1, str2 = input().split()
num1, num2 = map(int,input().split())
trim = input()
 
if trim == str1:
	num1 = num1 - 1
else:
  	num2 = num2 - 1
 
print("%d %d"  %(num1, num2))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
# -*- coding: utf-8 -*-
import math


#a = int(input())

st = input().split()
st_list = []
st_list = [int(st) for st in st]


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


s = input()


#a,b = map(input().split())

if(str(s) == st_list[0]):
  a = a-1
elif(str(s) == st_list[1]):
  b = b-1


print(a,b)



# -*- coding: utf-8 -*-
#import math


#a = int(input())

st = input().split()
st_list = []
st_list = [str(st) for st in st]


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


s = input()


#a,b = map(input().split())

if(str(s) == st_list[0]):
  a = a-1
elif(str(s) == st_list[1]):
  b = b-1


print(a,b)



Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N = input()
A = sorted(list(map(int,input().split())))
ans = "YES"
for i in range (1,len(A)):
    if A[i] == A[i-1]:
        ans = "NO"
print(ans)

s = input().split()
a = list(map(int,input().split()))
U = input()
if U == s[0]:
  a[0] = a[0] - 1
else:
  a[1] = a[1] - 1
print(str(a[0])+" "+str(a[1]))

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,b = input().split()
d = {}
d[s],d[b] = [int(x) for x in input().split()]
d[input] -= 1
print(d[s],d[b])

s,b = input().split()
d = {}
d[s],d[b] = [int(x) for x in input().split()]
d[input()] -= 1
print(d[s],d[b])

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s = input().split()
i = list(map(int, input().split()))
a=input()
if a==s[0]:
  i[0]-=1
elif a==s[1]:
  i[1]-=1
print(i)

s = input().split()
i = list(map(int, input().split()))
a=input()
if a==s[0]:
  i[0]-=1
elif a==s[1]:
  i[1]-=1
print(i[0],i[1])

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N,K = map(int,input().split())
P = list(map(int, input().split()))
 
A = 0
for i in range(N-K+1):
  B = 0
  for j in range(K):
    B += (1 + P[i+j])/2
    if B > A:
      A = B
 
print(A)

S,T = map(str,input().split())
A,B = map(int,input().split())
U = input()

if U == S:
  A -=1
else:
  B -= 1

print(str(A) +" " + str(B))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S, T = int, input().split()
A, B = map(int, input().split())
U = input()
ans = [A, B]
if U == S:
    ans[0] = A - 1
else:
    ans[1] = B - 1
print(" ".join(map(str, ans)))


S, T = input().split()
A, B = map(int, input().split())
U = input()
ans = [A, B]
if U == S:
    ans[0] = A - 1
else:
    ans[1] = B - 1
print(" ".join(map(str, ans)))


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
n, k = map(int, input().split())
p = list(int(i) for i in input().split())

kitai = list(map(lambda x: (x+1)/2, p))

gokei = 0

for i in range(n-k+1):
    wa = sum(kitai[i:i+k])
    if gokei < wa:
        gokei = wa

print(gokei)

s, t = input().split()
a, b = map(int, input().split())
u = input()

if s==u:
    a=a-1
else:
    b=b-1

print(a, b)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1)
else:
    print(B-1)

S, T = map(int, input().split())
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1)
else:
    print(B-1)

S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1,B)
else:
    print(A,B-1)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s = input()
print('×' * len(s))

s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if s == u:
  a -= 1
else:
  b -= 1

print(a, b)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if u == s:
  a = a - 1
if u == t:
  b = b - 1

print(a+" "+b)


s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if u == s:
  a = a - 1
if u == t:
  b = b - 1

print(str(a)+" "+str(b))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
n, k = map(int, input().split())
p = list(map(int, input().split()))

value = 0
index = 0

for i in range(0, k):
    value += p[i]

max = value

for i in range(1, n - k + 1):
    value = value - p[i - 1] + p[i + k - 1]
    if value > max:
        max = value
        index = i

total = 0
for i in range(index, index + k):
    total += p[i] / 2 + 0.5

print(total)

s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == u:
    a -= 1
else:
    b -= 1

print(str(a) + " " + str(b))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(input().split())
a, b = map(int, input().split())
u = input()

if s, t == u:
  print(a + b - 1)
else:
  print(a + b)

s, t = map(input().split())
a, b = map(int, input().split())
u = input()
if s == u:
  print(a - 1, b)
else:
  print(a, b - 1)

s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
  print(a - 1, b)
else:
  print(a, b - 1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
import sys
input=sys.stdin.buffer.readline
#from collections import defaultdict

#import fractions
#import math
#import collections
#from collections import deque

#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
S,T = input().split()
A,B = map(int,input().split())
U = input()
if S == U:
    print(A-1,B)
else:
    print(A,B-1)

a = list(input())
n = len(a)
for i in range(n):
  a[i] = "x"
l = "".join(a)
print(l)

#import sys

#from collections import defaultdict

#import fractions
#import math
#import collections
#from collections import deque

#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
S,T = input().split()
A,B = map(int,input().split())
U = input()
if S == U:
    print(A-1,B)
else:
    print(A,B-1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t=input().split()
a,b=map(int,input().split())
u=input().split()

print(a+b-1)

s,t=input().split()
a,b=map(int,input().split())
u=input()

if u==s:
    print(a-1,b)
else:
    print(a,b-1)


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
A,B=map(int,input().split())
S,T=map(str,input().split())
U=input()
if S==U:
  print(A-1,B)
else:
  print(A,B-1)

S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  T==U:
    print(A,B-1)

S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()
if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
if u == s:
  print(int(a-1) int(b))
else:
  print(int(a) int(b-1))

s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())
if u == s:
  print('{} {}'.format(a-1,b))
else:
  print('{} {}'.format(a,b-1))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a = input().split()
c, d = map(int, input().split())
e = input()

if (e == a): c -= 1
else: d -= 1

print("{}" "{}" "{}".format(c," ",d))


a = input().split()
c, d = map(int, input().split())
e = input()

if (e == a[0]): c -= 1
else: d -= 1

print("{}" "{}" "{}".format(c," ",d))


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N = int(input())
A = []
A = input().split()
ans = 1

for x in range(N):
    for y in range(N):
        if(x == y):
            continue
        if(A[x] == A[y]):
            ans = 0
            break

if(ans == 1):
    print("YES")
else:
    print("NO")

S, T = map(str,input().split())
A, B = map(int,input().split())
U = str(input())

if(S == U):
    A -= 1
elif(T == U):
    B -= 1
else:
    A
    B
    
print("{} {}".format(A, B))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S, a = input(), ""
for x in range(len(S)):
    a += "x"
print(a)


S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A, B)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S,T=input().split()

A,B=int(input().split())

U=input()

if S==U:
    A=A-1

elif T==U:
    B=B-1
else:
    pass

print(A,B)




S,T=input().split()
A,B=map(int,input().split())
U=input()
if S==U:
    print(A-1,B)
elif T==U:
    print(A,B-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):


S, T = input().split()
A, B = map(int, input().split())
U = input()

print(S)
print(U)
if S == U:
    print(A-1, B)
else:
    print(A, B-1)




S, T = input().split()
A, B = map(int, input().split())
U = input()


if S == U:
    print(A-1, B)
else:
    print(A, B-1)


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
l = {}
s, t = input().split()
a, b = map(int, input().split())
u = input()
print(a, b-1) if s==u else print(a-1, b)


l = {}
s, t = input().split()
a, b = map(int, input().split())
u = input()
print(a-1, b) if s==u else print(a, b-1)


Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a,b=input().split()
c,d=map(int,input().split())
e=int(input())
if e==a:
  c-=1
else:
  d-=1
print(c,d)

a,b=input().split()
c,d=map(int,input().split())
e=input()
if e==a:
  c-=1
else:
  d-=1
print(c,d)


Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
n = input()
(s,t) = n.split()
m = input()
(a,b)=m.split()
k = input()
if k is  s:
    a_1 = int(a) - 1
    print(str(a_1)+' '+ b)
else:
    b_1 = int(b) -1
    print(a +' '+str( b_1))



n = input()
(s,t) = n.split()
m = input()
(a,b)=m.split()
k = input()
if k == s:
    a_1 = int(a) - 1
    print(str(a_1)+' '+ b)
else:
    b_1 = int(b) -1
    print(a +' '+str( b_1))




Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
N,*a = map(int,open(0).read().split())
a.sort()
flag = True
for i in range(1,N):
  if a[i]==a[i-1]:
    print('NO')
    flag=False
    break
if flag ==True:
  print('YES')

S,U = map(str,input().split())
M,N = map(int,input().split())
a = str(input())
if S == a:
  print(M-1,N)
else:
  print(M,N-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
if len(set(A)) == N:
    print('YES')
else:
    print('NO')

if __name__ == "__main__":
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

if c == a[0]:
  print(b[0]-1)
if U == S:
    A -= 1
else:
    B -= 1
print(A, B)

if __name__ == "__main__":
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

if U == S:
    A -= 1
else:
    B -= 1
print(A, B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u=s a-=1
if u=t b-=1
print(a b)

a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a+' '+b)

a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a,b)

s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a,b)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s = input()
n = len(s)
print('x'*n)

s,t = input().split()
a,b = map(int, input().split())
u = input()
if s == u:
    a -= 1
else:
    b -= 1
print(a,b)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
D={s:x for s,x in zip(input().split(),list(map(int,input().split())))};D[input()]-=1;[print(D[s],end=" ")for s in D]

S=input().split();A=list(map(int,input().split()));A[input()==S[1]]-=1;print(A[0],A[1])

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = input().split()
a, b = map(int, input().split())
u = str(input())
 
if u = s:
  print(a-1, b)
else:
  print(a, b-1)

s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if u = s:
  print(a-1, b)
else:
  print(a, b-1)


s, t = input().split()
a, b = map(int, input().split())
u = str(input())
 
if u==s:
  print(a-1, b)
else:
  print(a, b-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
S,T=input().split()
A,B=map(int,input().split())
U=input()

d={S:A,T:B}

d[U]-=1

for i in list(d.values()):
    print(i, end=" ")

S,T=input().split()
A,B=map(int,input().split())
U=input()

if U==S:
    A-=1
else:
    B-=1
print(A, B)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s = input()
m = ""
for i in s:
    m = m + i.replace(i, 'x')
print(m)


S = input()
print('x'* len(S))

s, t = input().split() 
a, b = input().split() 
u = input()
int(a)
int(b)
if u == s:
    a = a-1
else:
    b = b-1
print(a+' '+b)

s, t = input().split() 
a, b = input().split() 
u = input()


if u == s:
    a = str(int(a)-1)
else:
    b = str(int(b)-1)

print(a+' '+b)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
A, B= input().split()
num = [int(x) for x in input().split()]
C = input()

if C == A:
  num[0]=num[0]-1
else:
  num[1]= num[1]-1
  
print(num[0]+" "+num[1])

S = input().split()
num = [int(x) for x in input().split()]
A = input()
 
if A == S[0]:
  num[0]=num[0]-1
else:
  num[1]= num[1]-1
  
print(str(num[0])+" "+str(num[1]))

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a,b=map(int,input().split())
s,t,u=map(input().split())
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

s=input()
t=input()
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

p,q,r=map(int,input().split())
if p>=q and  p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(p+q)

s=input()
t=input()
u=input()
a,b=map(int,input().split())
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

a=int(input())
s=input()
b=int(input())
t=input()
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

p,q,r=map(int,input().split())
if p>=q and  p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(p+q)

s=input()
t=input()
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

s,t=map(str,input().split())
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
a,b=input().split()
c,d=input().split()
e=input()
c=int(c)
d=int(d)
if a==e:
  print(c-1)
else:
  print(d-1)

a,b=input().split()
c,d=input().split()
e=input()
c=int(c)
d=int(d)
if a==e:
  print(c-1,d)
else:
  print(c,d-1)

Verdicts: Wrong Answer

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s, t = map(input().split())
a, b = map(int, input().split())
u = input()
print(a-1,b if s==u else a,b-1)

s, t = input().split()
a, b = map(int, input().split())
u = input()
if s==u:
    print(a-1,b)
else:
    print(a,b-1)

Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t=input().split()
a,b=map(int,iinput().split())
u=input()
if u==s:
  a=a-1
if u==t:
  b=b-1
print(a+' '+b)

s,t=input().split(' ')
a,b=map(int,input().split())
u=input()
if u==s:
  a=a-1
if u==t:
  b=b-1
print(a+' '+b)


s,t=input().split()
a,b=map(int,iinput().split())
u=input()
if u==s:
  a=a-1
if u==t:
  b=b-1
print(a,b)

s,t=input().split(' ')
a,b=map(int,input().split())
u=input()
if u==s:
    a=a-1
if u==t:
    b=b-1
print(str(a)+' '+str(b))
        

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  a -= 1
 else:
  b -= 1
 print(a,b)

s,t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  a -= 1
else:
  b -= 1
print(a,b)


Verdicts: Runtime Error

Accepted
Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
s,t=input().split()
a,b=map(int(),input().split())
u=input()
print(a-1,b if u==s else a,b-1)


s,t=input().split()
a,b=map(int,input().split())
u=input()
print(a-1,b) if u==s else print(a,b-1)


Verdicts: Runtime Error

Accepted