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):
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()
 
    print(U)

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

def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input().split()
 
    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(str(A) + " " + str(B))
 
if __name__ == "__main__":
    resolve()

def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input().split()
 
    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(A + " " + B)
 
if __name__ == "__main__":
    resolve()

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

def resolve():
    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))
 
if __name__ == "__main__":
    resolve()

Verdicts: 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):
red = int(input())
blue = int(input())
ans = input()
if ans=="blue":
  blue--
else:
  red--


red = int(input())
blue = int(input())
ans = input()
if ans=="blue":
  blue--
else:
  red--
print(red)
print(blue)

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):
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: 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(str(a-1)+ ''+str(b))
else:
  print(str(a)+ ''+str(b-1)) 

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


s,t=input().split()
a,b=map(int,input().split())
u=input()
if u==s:
  print(str(a-1)+ ' '+str(b))
else:
  print(str(a)+ ' '+str(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):
a,b = input().split()
x,y = int(input().split())
k = input()

if a == k:
  print(x-1,y)
else:
  print(x,y-1)


a,b = input().split()
x,y = map(int,input().split())
k = int(input())

if a == k:
  print(x-1,y)
else:
  print(x,y-1)


a,b = str(input().split())
x,y = int(input().split())
k = str(input())

if "a" == "k" :
  print(x-1,y)
elif "b" == "k" :
  print(x,y-1)
else:
  print(x,y)

a,b = str(input().split())
x,y = int(input().split())
k = str(input())

if a == k :
  print(x-1,y)
elif b == k :
  print(x,y-1)
else:
  print(x,y)

a,b = input().split()
x,y = int(input().split())
k = input()

if a == k :
  print(x-1,y)
else
  print(x,y-1)


a,b = input().split()
x,y = int(input().split())
k = input()

if a == k :
  print(x-1,y)
elif b == k :
  print(x,y-1)
else:
  print(x,y)


a,b = input().split()
x,y = int(input().split())
k = input()

if a == k:
  print(x-1,y)
else:
  print(x,y-1)


a,b = input().split()
x,y = map(int,input().split())
k = input()

if a == k:
  print(x-1,y)
else:
  print(x,y-1)


Verdicts: 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):
s, t = input.split()
a, b = input.split()
u = input()

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

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

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

if u == s:
    print(a-1, b)
if u == t:
    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(str,input().split())
u = str(input())
if(u==s):
  print(a-1,b)
elif(u==t):
  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)
elif(u==t):
  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):
n=int(input())
a=[i for i in input().split()]

print('YES' if len(set(a)==n) else 'NO')

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

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

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


def get_result(data):
    return 'x' * len(data)

if __name__ == '__main__':
    data = input()
    result = get_result(data)
    print(result)


from sys import stdin


def get_result(data):
    S, T = data[0]
    A, B = data[1]
    U = data[2][0]
    if S == U:
        A = A - 1
    elif T == U:
        B = B - 1
    return ' '.join([str(A), str(B)])

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(str, val.split(' '))) for val in raw_data]
    data[1] = [int(val) for val in data[1]]
    result = get_result(data)
    print(result)


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):
input_list = input().split()
input_list2 = list(map(input().split()))
delete_ball = input()
for ind, n in enumerate(input_list):
  if n == delete_ball:
    input_list2[ind] -= 1
print(input_list2)

input_list = input().split()
input_list2 = list(map(int, input().split()))
delete_ball = input()
for ind, n in enumerate(input_list):
  if n == delete_ball:
    input_list2[ind] -= 1
ans = ""
for m in input_list2:
  ans += str(m) + " "
print(ans.rstrip())

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=list(map(int,input().split()))
u=input()

if s==u:
    print(a[1])
else:
    print(a[0])

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

if s==u:
    a[0]-=1
else:
    a[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=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=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))


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,M = map(str,input().split())
NN,MM = map(int,input().split())
ress = input()
if(ress == N):
  NN = NN-1
elif(ress == M):
  MM == MM-1
print(MM,NN)
  


S,T = map(str, input().split())
A,B = map(int, input().split())
U = str(input())
if U == T:
    B-=1
else:
    A-=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(int,input().split())
a,b = map(int,input().split())
u = str(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 = str(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(input().split())
a,b=mao(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):
a=input().split()
N=int(a[0])
K=int(a[1])
zantei=0
P=list(map(float,input().split()))

P_ex=list(map(lambda x: (x+1)/2,P))


for i in range(0,K):
    
    zantei+=P_ex[i]
zanans=0
buffer=P_ex[0]
beforeans=zantei
for i in range(1,N-K+1):
    if(beforeans-buffer+P_ex[K+i-1]>zantei):
        zantei=beforeans+P_ex[K+i-1]-buffer
    buffer=P_ex[i]
    beforeans+=P_ex[K+i-1]-buffer

print(zantei)

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

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

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

if input() == 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):
'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
  else:
    bn -= 1
print(an, bn)    
  

'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
else:
    bn -= 1
print(an, bn)


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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))


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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A,b))


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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))


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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))


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

a = A - 1
b = B - 1

if U == S:
  print('{} {}'.format(a,B))
else:
  print('{} {}'.format(A,b))


Verdicts: 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):
import sys
a,b=map(str, sys.stdin.readline().split())
c,d=map(int, sys.stdin.readline().split())
e=sys.stdin.readline()
if a==e:
  c-=1
else:
  d-=1
print(c,d)

s, t = map(str, input().split())
a, b = map(int, input().split())
e = input()
if s==e:
  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(i) for i in input().split()]

U = input().split()

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

S, T = input().split()

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

U = input()

if U == S :
    A = A - 1
else :
    B = 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):
l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n[0]-1
    print(n[0],n[1])
elif l[1]==t:
    n[1]=n[1]-1
    print(n[0,n[1])

l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n[0]-1
    print(n)
elif l[1]==t:
    n[1]=n[1]-1
    print(n)

l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n-1
    print(n)
elif l[1]==t:
    n[1]=n-1
    print(n)

l=input().split() 
n = list(map(int, input().split()))
t=input()
if l[0]==t:
    n[0]=n[0]-1
    print(n[0],n[1])
elif l[1]==t:
    n[1]=n[1]-1
    print(n[0],n[1])

Verdicts: 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 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:
    print({}""{},(A-1)+B)
else:
    print({}""{},A+(B-1))

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):
S, T = input().split()
a, b = int(input.split())
U = input()
if str(S) == str(U):
  print(a-1)
else:
  print(b-1)

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

S, T = input().split()
a, b = int(input.split())
U = input()
if list(S) == list(U):
  print(a-1)
else:
  print(b-1)

S, T = input().split(" ")
A, B = [int(i) for i in input().split(" ")]
U = input()
 
if S==U :
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(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):
N = int(input())
K = int(input())

count = 0
i = 1
while i <= N:
  s = str(i)
  if K == len(s) - s.count("0"):
    count = count + 1
  i = i + 1

print(count)

N = int(input())
K = int(input())

count = 0
i = 1
while i <= N:
  s = str(i)
  if K == (len(s) - s.count("0")):
    count = count + 1
  i = i + 1

print(count)

tmp = input().split()
S = tmp[0]
T = tmp[1]
i = list(map(int, input().split()))
A = i[0]
B = i[1]
U = input()

if S == U:
  print(str(A-1) + " " + str(B))
else:
  print(str(A) + " " + str(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()
print('x'*len(s))

t,s=map(str,input().split())
a,b=map(int,input().split())
u=input()
if u==t:
    a-=1
elif u==s:
    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=list(input())
print("x"*len(s))

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)
  

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=imput()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)


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


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


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


a, b=map(str,input().split())
c, d=map(int,input().split())
e=input()
f=str(e)
if a==f:
  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):
ball = input().split()
number = list(map(int, input().split()))
U = input()

if U == ball[0]:
    number[0] -= 1
else:
    number[1] -= 1
print(number)


ball = input().split()
number = list(map(int, input().split()))
U = input()

if U == ball[0]:
    number[0] -= 1
else:
    number[1] -= 1
print(number[0], number[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 sys
read = sys.stdin.buffer.read 
readline = sys.stdin.buffer.readline 
readlines = sys.stdin.buffer.readlines 

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

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


import sys
read = sys.stdin.buffer.read 
readline = sys.stdin.buffer.readline 
readlines = sys.stdin.buffer.readlines 

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

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

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

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

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

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

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

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

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

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

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()))
u = sum(p[0:k])
maxsum = u
for i in range(1, n-k+1):
	u = u + p[i+k-1] - p[i-1]
	if u >= maxsum:
		maxsum = u
print((maxsum+k)/2)

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

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

ls = P[0:K]
summ = sum(ls)
ans = [0]*K

for i in range(N-K+1):
    if summ < sum(P[i:i+K]):
        ls = P[i:i+K]
        summ = sum(ls)
for j in range(K):
    ans[j]=(ls[j]+1)*ls[j]/(2*ls[j])
print(sum(ans))

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 = input().split()
num = [int(i) for i in input().split()]
u = input()
num1 = num[0]
num2 = num[1]

if s[0] == u:
    nums = num1 - 1
    print("{} {}".format(nums, num1))
elif s[1] == u:
    nums = num2 - 1
    print("{} {}".format(num1, nums))


s = input().split()
num = [int(i) for i in input().split()]
u = input()
num1 = num[0]
num2 = num[1]

if s[0] == u:
    nums = num1 - 1
    print("{} {}".format(nums, num2))
elif s[1] == u:
    nums = num2 - 1
    print("{} {}".format(num1, 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):
n=int(input())
l=list(map(int, input().split()))
tester=True
for i in range(n):
    for j in range(i+1,n):  
        if l[i]==l[j]:
            tester=False
            break

if tester==True:
    print('YES')
else:
    print('NO')




s,t=map(str, input().split())
a,b=map(int, input().split())
u=input()
if s==u:
    if t==u:
        print(a-1,b-1)
    else:
        print(a-1,b)
else:
    if t==u:
        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):
str = input().split(" ")
S = str[0]
T = str[1]
num = input().split(" ")
NS = int(num[0])
NT = int(num[1])
U = input()

if S == U:
  print(str(NS - 1) + " " + str(NT))
else:
  print(str(NS) + " " + str(NT - 1))

str = input().split(" ")
S = str[0]
T = str[1]
num = input().split(" ")
NS = int(num[0])
NT = int(num[1])
U = input()

if S == U:
  print(NS - 1, end=" ")
  print(NT)
else:
  print(NS, end=" ")
  print(NT - 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):
n, k = map(int, input().split())
p = list(map(int, input().split()))

total_expects = []

for i in range(0, n):    
    
    expect = [q * (1 / p[i]) for q in range(1, p[i]+1)]
    total_expects.append(sum(expect))

print(max([sum(total_expects[i:i+k]) for i in range(0, k)]))

s, t = map(str, input().split())
a, b = map(int, input().split())
u = str(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):
s,t = input().split()
a,b = map(int, input().split())
u = input()

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

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)
else:
  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)
else:
    print(a,b)

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()
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
if t == u:
  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):
print("enter S and T value")
S, T = input().split()
print("enter A and B value")
A, B = map(int, input().split())
print("enter U value")
U = input()
if S==U:
  print("{} {}".format(A-1,B))
elif T==U:
  print("{} {}".format(A,B-1))

words = input()
print("x"*len(words))

print("enter S and T value")
S, T = input().split()
print("enter A and B value")
A, B = map(int, input().split())
print("enter U value")
U = input()
if S==U:
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(A,B-1))

aa

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



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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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):
def ex_value(dice):
  return (1+dice)/2
def main():
  n,k = map(int, input().split())
  list_p = list(map(int, input().split()))
  list_ex_val = list(map(ex_value, list_p))
  print(max([sum(list_ex_val[i:i+k]) for i in range(n-k+1)]))
     
if __name__ == '__main__':
  main()

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):
M = [input() for i in range(3)]
M[0] = M[0].split()
s = str(M[0][0])
t = str(M[0][1])

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

U = str(M[2])

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

print(str(a) + ' ' + str(b))

M = [input() for i in range(3)]
M[0] = M[0].split()
s = str(M[0][0])
t = str(M[0][1])

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

U = str(M[2])


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


s,t=input().split()
a,b=map(int,input().split())
sum=a+b
u=input()
if(u==s):
    a=a-1
else:
    b=b-1
print(a,end=" ")
print(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()))
 
e = []
 
for i in range(len(p)):
	e.append((1 + p[i]) / 2)

tmp = 0
l = 0
 
while True:
  res = 0
  j = 0
  for j in range(k):
    res = res + e[l + j]
  if tmp < res:
    tmp = res
  l = l + 1
  if l + k > len(e):
    break

print(tmp)

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

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

if s == u and not t == u:
    gap = a -1
    print(int(gap),b)
else:
    gap = b -1
    print(a,int(gap))

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

if s = u and not t = u:
    gap = a -1
    print(int(gap),b)
else:
    gap = b -1
    print(a,int(gap))s

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

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

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

if s = u and not t = u:
    gap = a -1
    print(int(gap))
else:
    gap = b -1
    print(int(gap))s

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

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

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

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 = map(int, input())
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):
keys = input.split()
values = tuple(map(int, input().split()))

ball = dict(zip(keys, values))
u = input()

ball[u] -= 1
print(ball[keys[0]], ball[keys[1]])


keys = input().split()
values = tuple(map(int, input().split()))

ball = dict(zip(keys, values))
u = input()

ball[u] -= 1
print(ball[keys[0]], ball[keys[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):
n = int(input())
*l, = map(int, input().split())
def has_duplicates(seq):
    return len(seq) != len(set(seq))
S = has_duplicates(l)
if str(S) == 'False':
  print('YES')
elif str(S) == 'True':
  print('NO')



n = int(input())
*l, = map(int, input().split())
L = sorted(l)
S = 0
for i in range(n):
  for l in range(n):
    if L[i] == L[l]:
      S = 1
if S == 0:
  print('Yes')
elif S == 1:
  print('No')

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

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(n) for n in input().split()]
ans = {S:A, T:B}
U = input()
ans[U] -= 1
print([i for i in ans.values()])


S, T = input().split()
A, B = [int(n) for n in input().split()]
ans = {S:A, T:B}
U = input()
ans[U] -= 1
print(ans[S], ans[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 = int(input().split())
u = input()
if s == u:
  print(a-1, b)
else:
  print(a,b-1)


s, t = input().split()
a, b = 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 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 = input()
print("s" * len(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

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(S-1, T)
else:
    print(S, T-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=map(input().split())
a,b=map(int,input().split())
c=input()
d=""
if s==c:
  print("{}""{}""{}".format(a-1,d,b))
else:
  print("{}""{}""{}".format(a,d,b-1))

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

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

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

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

import numpy as np
n = int(input())
b = list(int(x) for x in input().split())
a=np.array(b)

x = 0
for i in range(n):
    if (a[0] in np.delete(a, 0)) is True:
        print("NO")
        x = 1
        break

if x == 0:
    print("YES")


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

Verdicts: 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):
s,t=list(map(str,input().split()))
a,b=list(map(int,input().split()))
u=list(map(str,input().split()))
if s != t:
    if u == s:
        a = a-1
    else:
        b = b-1
print(a,'',b)

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(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())
a = list(map(int, input().split()))
a.sort()
for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    break
print("YES")


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):
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1
print(N_dict[str(input())]-1)

N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1

N_dict[str(input())] -= 1
print(" ".join(list(map(str,N_dict.values()))))


N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1

N_dict[str(input())] -= 1
" ".join(list(map(str,N_dict.values())))


N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[ct]
    ct += 1

N_dict[str(input())] -= 1
print(" ".join(list(map(str,N_dict.values()))))


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted