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):
S, T ＝ map(str, input().split())
A, B ＝ map(int, input().split())
U ＝ input()

if S ＝＝ U:
    A ＝ A － 1
else：
    B ＝ B － 1
  
print(A)
print(B)

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

if S ＝＝ U：
    A ＝ A － 1
else：
    B ＝ B － 1
print(str(A)＋str(B))

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

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

print(str(A) + " " + str(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 = input().split()
a, b = map(int, input().split())
u = input()

if s == t:
    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: 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 s == u:
    print(a-1, b, end="")
else:
    print(a, b-1, end="")

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

if s == u:
    print(a-1,end="")
    print(b)
else:
    print(a,end="")
    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: 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()
l = len(S)
print('x'*l)

S,T = input().split()
s,t = map(int,input().split())
U = input()

if U==S:
  s -= 1
else:
  t -= 1
  
print(s,t)

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()
if u in s:
    print(a-1)
if u in t:
    print(b-1)

s,t = input().split()
a,b = map(int,input().split())
u = input()
if s == u:
    print(a-1,b)
if t == u:
    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):
def main():
    S,T = input().split()
    a,b = map(int,input().split())
    u = input()
    print(a-1,b if S == u else a,b-1)
    return

if __name__ == "__main__":
    main()

def main():
    S,T = input().split()
    a,b = map(int,input().split())
    u = input()
    if S == u:
        print(a-1,b)
    else:
        print(a,b-1)
    return

if __name__ == "__main__":
    main()

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):
import  copy
N, K = map(int,input().split())
p = [int(i) for i in input().split()]
P = []
P_S = [0]
ans_list = []
temp = 0

for i in range(N):
    P.append((p[i] + 1)/2)
    temp = temp + P[i]
    P_S.append(temp)
for i in range(K,N+1):
    ans_list.append(P_S[i] - P_S[i - K])

print(max(ans_list))

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

if U == S:
    print(A-1,B)
elif U == T:
    print(A,B-1)
else:
    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):
a,b = input().split
c,d = map(int,input().split())
e = input()

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

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

if a == e:
  print("{} {}".format(c-1,d))
else:
  print("{} {}".format(c,d-1))

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

if a == e:
  print("{} {}".format(c-1,d))
else:
  print("{} {}".format(c,d-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(strinput().split())
A=len(S)
B=len(T)
ptint(A,{},B)
U =input()
if U==S:
  A-=S
elif U==T:
  B-=1
else:
  pass

S,T= map(str,input().split())
A,B=map(int,input().split())
U =input()
if U==S:
  A-=1
elif U==T:
  B-=1
else:
  pass
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):
#!/usr/bin/env python3

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

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

    print(A, B)


main()


#!/usr/bin/env python3

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

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

    print(A, B)


main()


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):
str1, str2 = input().split()
cnt1, cnt2 = list(map(int, input().split()))
tar = input()

if tar == str1:
  cnt1 -= 1
else
  cnt2 -= 1

print(str(cnt1) + " " + str(cnt2))

str1, str2 = input().split()
cnt1, cnt2 = list(map(int, input().split()))
tar = input()

if tar == str1:
  cnt1 -= 1
else:
  cnt2 -= 1

print(str(cnt1) + " " + str(cnt2))

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 = input().split()
c,d = map(int,input().split())
e =input()

If a = e;
		print(c-1,d)
		
else;
		print(c,d-1)

a,b = input().split()
c,d = map(int,input().split())
e =input()
 
if a == e:
		print(c-1,d)
		
else:
		print(c,d-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=(int(x) for x in input().split())
U = input()
 
if S == U:
  A = A - 1
  print(A +" " + B)
  
else:
  B = B - 1
  print(A + " " + B)

S,T=input().split()
A,B=(int(x) for x in input().split())
U = input()

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

S,T=input().split()
A,B=(int(x) for x in input().split())
U = input()
 
if S == U:
  A = A - 1
  print(A, B)
  
else:
  B = 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):
red blue
5 5
blue

if __name__ == '__main__':
    s = input()
    a = s.split(" ", )
    c, d = map(int, input().split())
    f = input()
    if f  == a[0]:
        c = c-1
    else:
        d = d-1
    print(str(c)+" "+str(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):
s = input()
t = input()
sa,tb = map(int,input())
u = input()
if u == s:
    sa -= 1
else:
    tb -= 1
print(sa,tb)



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


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, c = [0] * 3
x = []

def format_input(filename = None):
	global a, b, c
	global x
	if filename == None:
		a, b, c = list(map(int, input().split()))
		x = [list(map(int, input().split())) for i in range(n)]

	elif filename == '__random__'
		from random import randint as rng
		a = rng(1, 10**1)
		b = rng(1, 10**1)
		c = rng(1, 10**1)
		x = [[rng(1, 10**1), rng(1, 10**1)] for i in range(n)]

def get_answer(a, b, c, x):
	answer = 0
	return answer

if __name__ == '__main__':
	format_input('__random__')

	ans = get_answer(a, b, c, x)
	print(ans)




s, t= [""] * 2
a, b = [0] * 2
u = [""]

def format_input(filename = None):
	global s,t
	global a,b
	global u
	if filename == None:
		s, t = list(map(str, input().split()))
		a, b = list(map(int, input().split()))
		u = list(map(str, input().split())).pop()

def get_answer():
	answer = [a, b]
	if u == s:
		answer[0] -= 1
	else:
		answer[1] -= 1

	return answer

if __name__ == '__main__':
	format_input()

	ans = get_answer()
	print(ans[0], ans[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 s == u:
    print(s - 1 , t)
else:
    print(s, t - 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 = list(map(int, input().split()))
u = input()

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

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s,t = [i.rstrip() for i in readline().split()]
a,b = [int(i) for i in readline().split()]
u = readline()

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

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

if u == s:
    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):
nk = list(map(int, input().split()))
p = list(map(int, input().split()))
n = nk[0]
k = nk[1]
maxnum = 0
for i in range(n-k):
    if p[i+k] >= p[i]:
        maxnum = i+k

ans = (sum(p[maxnum-k+1:maxnum+1])+k)/2
print(ans)

alc = input().split()
nums = list(map(int, input().split()))
choose = input()

ans0 = nums[0] - int(alc[0]==choose)
ans1 = nums[1] - int(alc[1]==choose)
print(ans0, ans1)

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())
c = input()
if c == a: a -= 1
else: b -= 1
print(a, b)

s, t = input().split()
a, b = map(int, input().split())
c = input()
if c == 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,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1)
elif t==u:
    print(int(b)-1)

s,t,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1,b)
elif t==u:
    print(a,int(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()
u = input()
          
if u == s:
	print(a-1,b)
elif u == t:
    print(a,b-1)
else:
    print(a,b)

s,t = input().split()
a,b = map(int,input().split())
u = input()
          
if u == s:
	print(a-1,b)
elif u == t:
    print(a,b-1)
else:
    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):
strings = input().split()
nums =  list(map(int, input().split(" ")))
delete = input()
for i in range(2):
    nums[i] = (nums[i] -1)  if strings[i] == delete else nums[i]
print(nums)

strings = input().split()
nums =  list(map(int, input().split(" ")))
delete = input()
for i in range(2):
    nums[i] = (nums[i] -1)  if strings[i] == delete else nums[i]
print(*nums)

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):
print(input())

s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(s-1,t)
else:
  print(s,t-1)  

s = input()
t = input()
a = int(input())
b = int(input())
u = input()

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

print(input(),input())

s = input()
t = input()
a = int(input())
b = int(input())
u = input()

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

s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(a-1, b)
else:
  print(a, b-1)  

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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,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()
if S==U:
  print(str(A-1)+" "+str(B))
else:
  print(str(A)+" "+str(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:
  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)

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

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


a = 123
b = 'abc'

print(f'{a} and {b}')
# print(f'{s} {t}')


#     a-=1
#     print(f'{a} {b}')
# else:
#     b-=1
#     print(f'{a} {b}')


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

print(f'{a} {b}')


#     a-=1
#     print(f'{a} {b}')
# else:
#     b-=1
#     print(f'{a} {b}')


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

print(f'{s} {t}')


#     a-=1
#     print(f'{a} {b}')
# else:
#     b-=1
#     print(f'{a} {b}')


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


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

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



color = input.split()

num = input.split()

stock[color[0]] = num[0]
stock[color[1]] = num[1]

u = input.split()

stock[u] = stock[u] - 1

print({col1} {col2}).format(col1=stock[color[0]],col2=stock[color[1]])

color = input().split()
 
num = input().split()

stock = {}
stock[color[0]] = num[0]
stock[color[1]] = num[1]
 
u = input().split()
 
stock[u[0]] = int(stock[u[0]]) - 1
 
print('{col1} {col2}'.format(col1=stock[color[0]],col2=stock[color[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().split()

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)

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

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()))
kitai=[0]*N
kitaiwa=[0]*(N-K+1)
if N=K:
    print(sum(kitai))
elif K==1:
    print(max(kitai))
else:
    for i in range(N):
        kitai[i]=(p[i]+1)/2
    for i in range(N-K+1):
        for j in range(K):
            kitaiwa[i]+=kitai[i+j]
    print(max(kitaiwa))

S,T=map(str, 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:
  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):
    b = input().split()
    a = list(map(int, input().split()))
    c = {b[i]:a[i] for i in range(len(b))}
    print(c[input()] - 1)

b = input().split()
a = map(int, input().split())
c = {b[i]:a[i] for i in range(len(b))}
print(c[input()] - 1)


b = input().split()
a = list(map(int, input().split()))
c = {b[i]: a[i] for i in range(len(b))}
d = input()
for i, j in c.items():
    print(j - 1 if i == d else j, end=" ")

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

Verdicts: Runtime Error

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=A-1
else:
    B=B-1
print(" ".join([A,B]))

S,T=input().split(" ")
A,B=map(int,input().split(" "))
U=input()
if U==S:
    A=A-1
else:
    B=B-1
print(" ".join([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 = list(map(int, input().split()))
A = list(map(int, input().split()))
U = int(input())

ind = S.index(U)

A[ind] -= 1

print("".join(A))


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

ind = S.index(U)

A[ind] -= 1

print("".join(A))


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

ind = S.index(U)

A[ind] -= 1

print(" ".join(list(map(str, A))))


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):
N=input()
A=input().split()
if(A in N):
  print("YES")
else:
  print("NO")

S,T=input().split()
A,B=input().split()
U=input()
if(str(S)==str(U)):
  A=int(A)-1
if(str(T)==str(U)):
  B=int(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()))

maxexp = 0
for i in range(n-k+1):
    kdice = [float((1+p[i+j])/2) for j in range(k)]
    sumkdice = sum(kdice)
    if sumkdice > maxexp:
        maxexp = sumkdice

print(maxexp)

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 = intput().split("")
a, b = map(int, input().split(""))
u = input()

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

str = input().split()
s = str[0]
t = str[1]
a, b = map(int, input().split())
u = input()
 
if u == t :
  num = b - 1
  print(a, num)
else:
  num = a - 1
  print(num, 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()
print('x'*len(s))


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

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


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


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

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


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

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

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: Wrong Answer

Wrong Answer

Wrong Answer

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):
N = int(input())
A = input().split()
flag = 1

for j in range(N):
	for i in range(N):
		if i+j+1<N:
			if A[j] == A[i+j+1]:
				flag = 0
				break
if flag==0:
	print('NO')
elif flag==1:
	print('YES')



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

if s == u :
	a = a - 1
elif t == u:
	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 = map(input().split())
a,b = map(int,input().spli())
u = input()
if u==s:
    print(a-1,b)
else:
    print(a,b-1)

s = input().split()
a,b = map(int,input().split())
u = input()
if u==s[0]:
    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 = input()
print('x' * len(S))


C1,C2= map(str,input().split())
CN1,CN2= map(int,input().split())
ColorTaken = str(input())
if ColorTaken == C1 :
    print ( CN1 - 1 , CN2 )
else :
    print ( CN1 , CN2 - 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 = input()

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

print(a + ' ' + b)

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

if s == u:
    a = a - 1
else:
    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):
S, T = input().split()
A, B = input().split()
U = input()

print(f"{int(A) - 1 if S == U else 0} {int(B) - 1 if T == U else 0}")


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

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


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

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


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):
def main():
    s = input().split()
    n, m = list(map(int, input().split()))
    d = input()
    #print(s)
    if s[0] == d:
        print(n - 1, m)
    else:
        print(n, m - 1)


if __name__

def main():
    s = input().split()
    n, m = list(map(int, input().split()))
    d = input()
    #print(s)
    if s[0] == d:
        print(n - 1, m)
    else:
        print(n, m - 1)


if __name__ == "__main__":
    main()


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

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):
n = int(input())
tmp = input().split()
length = len(tmp)
length2 = len(list(set(tmp)))
if length == length2 :
  print("YES")
else:
  print("NO")

st = input().split()
ab = input().split()
u = input()
if u == st[0]:
 print(int(ab[0])-1,int(ab[1]))
else:
 print(int(ab[0]),int(ab[1])-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 = input()
print('x'*len(S))

a,b = input().split()
n,m = map(int, input().split())
s = input()
if a == s:
  print(n-1,m)
else:
  print(n,m-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(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)


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

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

s,t=input().split()
a,b=map(int,input().split())
u=input()
ans=[]
if u==s:
  ans.append(str(a-1))
  ans.append(str(b))
else:
  ans.append(str(a))
  ans.append(str(b-1))
print(" ".join(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):
s, t = input().split()
a, b = int(input().split())
u = input()

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

s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if s == u:
  a = a - 1
else:
  b =  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):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
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 u == s:
  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=map(int,input().split())
a,b=map(int,input().split())
if s==input(): 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 = input(), T = input()
A,B = map(int,input().split())	
U = input()

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

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

if li[1] == U:
    B -= 1
    print(A,B)
else:
    A -= 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):
a,b=input().split()
c,d=map(int,input().split())
print(c-1 if input()==a else d-1)

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


a,b=input().split()
c,d=map(int,input().split())
if input()==a:
    print(c-1,d)
else:
    print(c,d-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()

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')


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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')


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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(dic[key],end='')
    print(' ',end='')


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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(dic[key],end='')
    print(' ',end='')


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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')

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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

for key in dic.keys():
    print(str(dic[key])+' ',end='')


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

dic = {}
dic[S] = A
dic[T] = B

dic[U] -= 1

print(dic[S],dic[T])


Verdicts: Wrong Answer

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(str,input().split())
X,Y = map(int,input().split())
Z = input()
if S==Z or T==Z:
    print(X+Y-1)
else:
    print(X+Y)


S,T = map(input().split())
X,Y = map(int,input().split())
Z = input()
if S==Z or T==Z:
    print(X+Y-1)
else:
    print(X+Y)


S,T = map(str,input().split())
X,Y = map(int,input().split())
Z = input()
if S==Z:
  print(X-1,Y)
elif T==Z:
    print(X,Y-1)
else:
    print(X,Y)


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, _T = input().split()
A, B = list(map(lambda x:int(x), input().split()))
U = input()


if U == A:
    is_type_A = True
else:
    is_type_A = False

if is_type_A:
    print(A - 1, B)
else:
    print(A, B-1)

_S, _T = input().split()
A, B = list(map(lambda x:int(x)), input().split())
U = input()


if U == A:
    is_type_A = True
else:
    is_type_A = False

if is_type_A:
    print(A - 1, B)
else:
    print(A, B-1)

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


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

_S, _T = input().split()
A, B = list(map(lambda x:int(x), input().split()))
U = input()


if U == _S:
    is_type_A = True
else:
    is_type_A = False

if is_type_A:
    print(A - 1, B)
else:
    print(A, B-1)

Verdicts: Wrong Answer

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):
N = int(input())
A = input().split()
for i in A:
    A = [j for j in A if j != i]
    if len(A) == N - 1:
        N -= 1
        continue
    else:
        print("NO")
        break
if N == 0:
    print("YES")


S, T = 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):
import numpy

S, T = map(str, input().split())
AB = list(map(int, input().split()))
U = input()

if U == S:
    tmp = numpy.array([1,0])
else:
    tmp = numpy.array([0,1])
print(numpy.array(AB-tmp))

import numpy

S, T = map(str, input().split())
AB = list(map(int, input().split()))
U = input()

if U == S:
    tmp = numpy.array([1,0])
else:
    tmp = numpy.array([0,1])
print(numpy.array(AB-tmp)[0], numpy.array(AB-tmp)[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(str,input().split())
a,b=map(int,input().split())
u=str(input())
print(a-1,b if u==s else a,b-1)

s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())
print((a-1),b) if u==s 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):
import re
i = input()
print(re.sub('[abcdefghijklmnopqrstuvwyz]', 'x',i))

i = input()
print(re.sub'[abcdefghijklmnopqrstuvwyz]', 'x',i)

i = input().split()
j = list(map(int, input().split()))
k = input()
if k==i[0]:
    j[0]=j[0]-1
else:
    j[1]=j[1]-1
print(j[0], j[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()
t = input()

a = int(input())
b = int(input())

u = input()
if u == s:
    a -= 1
elif u == t:
    b -= 1
print(str(a) + ' ' + str(b))

s = input()
t = input()

a = int(input())
b = int(input())

u = input()
if u == s:
    a -= 1
elif u == t:
    b -= 1
print(a +" " + b)

color = input().split()

num = input().split()
a = int(num[0])
b = int(num[1])


u = input()
if u == color[0]:
    a -= 1
elif u == color[1]:
    b -= 1
print(str(a) + ' ' + str(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=input().split()
a,b=map(int.input().split())
u=input()
print(a-1,b) if s==u else print(a,b-1)

s,t=input().split()
a,b=map(int.input().split())
u=input()
print(a-1,b) if s==i 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

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()
lis = list(input().split())
N1 = int(lis[0])
N2 = int(lis[1])
Z = input()
print(S,T,lis,Z,N1,N2)

if Z == S:
    print(N1-1,N2)
elif Z == T:
    print(N1,N2-1)
else:
    print(N1,N2)

S, T = input().split()
lis = list(input().split())
N1 = int(lis[0])
N2 = int(lis[1])
Z = input()
#print(S,T,lis,Z,N1,N2)

if Z == S:
    print(N1-1,N2)
elif Z == T:
    print(N1,N2-1)
else:
    print(N1,N2)

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):
from sys import stdin

S,T = stdin.readline().rstrip().split()
A,B = [int(x) for x in stdin.readline().rstrip().split()]
U = stdin.readline().rstrip().split()

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

from sys import stdin

S,T = stdin.readline().rstrip().split()
A,B = [int(x) for x in stdin.readline().rstrip().split()]
U = stdin.readline().rstrip().split()

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

from sys import stdin

S,T = stdin.readline().rstrip().split()
A,B = [int(x) for x in stdin.readline().rstrip().split()]
U = stdin.readline().rstrip().split()

if S==U[0]:
	print(str(A-1)+" "+str(B))
else :
	print(str(A)+" "+str(B-1))

Verdicts: Wrong Answer

Wrong Answer

Accepted