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):
N,K = map(int,input().split())
PP = list(map(int,input().split()))


mind = -1
mmax = -1

sums = []
csum = 0

for i in range(N):
    p = PP[i]
    csum += (p+1)/2
    sums.append(csum)
    if i < K:
        if mmax < csum:
            mind = i
            mmax = csum
    else:
        ksum = csum - sums[(i-K)]
        if mmax < ksum:
            mind = i
            mmax = ksum
            
print(ksum)
time3 = datetime.now()

       




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):
#ABC154A
import sys
from collections import OrderedDict
d = OrderedDict()
s,t = sys.stdin.readline().split()
n1, n2 = map(int, sys.stdin.readline().split())
d[s] = n1
d[t] = n2

d[sys.stdin.readline()] -=1

print(*d.values())

#ABC154A
import sys
from collections import OrderedDict
d = OrderedDict()
s,t = sys.stdin.readline().split()
n1, n2 = map(int, sys.stdin.readline().split())
d[s] = n1
d[t] = n2

d[sys.stdin.readline().rstrip()] -=1

print(*d.values())


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

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

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

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

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

S, T = map(str, input().split())
a, b = map(int, input().split())
u = input()

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


Verdicts: Runtime Error

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

if n==u:
  a=a-1
  
if m==u:
  b=b-1

print(n,m)
print(a,b)
print(u)

n, m = map(str, input().split())
a, b = map(int, input().split())
u = str(input())

if n==u:
  a=a-1
  
if m==u:
  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):
S = str( input() )
T = str( input() )
A = int( input() )
B = int( input() )
U = str( input() )

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

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

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

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

if(u in s[0]):
    print(str(a - 1) + ' ' + str(b))
elif(u in s[1]):
    print(str(a) + ' ' + str(b - 1))
else:
    print(str(a) + ' ' + str(b))


from sys import stdin

s, t = stdin.readline().rstrip().split()
a, b = [int(x) for x in stdin.readline().rstrip().split()]
u = input()

if (u in s):
    print(str(a - 1) + ' ' + str(b))
elif (u in t):
    print(str(a) + ' ' + str(b - 1))
else:
    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().strip()
print(a - S == U, b - S == T)

S, T = input().split()
a, b = map(int, input().split())
U = input().strip()
print(a - (S == U), b - (T == U))

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(B)
else:
    print(A)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
N=int(input())
A=input()
if len(set(A))-1==N:
    print("Yes")
else:
    print("No")

S,T=input().split()
A,B=input().split()
U=input()
a=int(A)
b=int(B)
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):
# -*- coding: utf-8 -*-


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


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





# -*- coding: utf-8 -*-


n = int(input())

A = list(map(int, input().split()))

result = 'YES'


for i in range(n):
    for j in range(n):
        if j == i:
            continue
        else:
            if A[i] == A[j]:
                result = 'NO'
                
                goto .end


label.end

print(result)

    


# -*- coding: utf-8 -*-


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


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


print('{} {}'.format(A, B))





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


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


Verdicts: Wrong Answer

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

Submission attempts (in order):

a = input()
b = input()


aCount = int(input())
bCount = int(input())
ball = []
ball.append(aCount)
ball.append(bCount)


selectBall = input()

if selectBall == a:
    aCount = aCount-1
    ball[0] = aCount
    print(' '.join(map(str,ball)))
elif selectBall == b:
    bCount = bCount-1
    ball[1] = bCount
    print(' '.join(map(str,ball)))
else:
    print(' '.join(map(str,ball)))





s = input()
sLength = len(s)
hoge = []

for i in range(sLength):
    c = s[i]
    c = "x"
    hoge.append(c)

print(''.join(map(str,hoge)))




a = input()
b = input()


aCount = int(input())
bCount = int(input())
ball = []
ball.append(aCount)
ball.append(bCount)


selectBall = input()


# aLength = len(a)
# bLength = len(b)

# print(aLength)
# print(bLength)

if selectBall == a:
    aCount = aCount-1
    # print(aCount)
    ball[0] = aCount
    print(' '.join(map(str,ball)))
elif selectBall == b:
    bCount = bCount-1
    ball[1] = bCount
    print(' '.join(map(str,ball)))
else:
    print(' '.join(map(str,ball)))



a, b = input().split()


aCount, bCount = input().split()
aNumber = int(aCount)
bNumber = int(bCount)

ball = []
ball.append(aNumber)
ball.append(bNumber)


selectBall = input()

if selectBall == a:
    aNumber = aNumber-1
    ball[0] = aNumber
    print(' '.join(map(str,ball)))
elif selectBall == b:
    bNumber = bNumber-1
    ball[1] = bNumber
    print(' '.join(map(str,ball)))
else:
    print(' '.join(map(str,ball)))


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):
Ball = list(map(str, input().split()))
Num = list(map(int, input().split()))
OutputBall = input()
print((Num[0] - 1, Num[1]) if Ball[0] == OutputBall else (Num[0],
      Num[1] - 1))


Ball = list(map(str, input().split()))
Num = list(map(int, input().split()))
OutputBall = input()
Output = [Num[i] - 1 if Ball[i] == OutputBall else Num[i] for i in range(2)]
print(Output[0], Output[1])

Verdicts: Wrong Answer

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
N,K=map(int,input().split())
p=list(map(int,input().split()))
p_=[0]*N
for a in range(N):
    p_[a]=(1+p[a])/2
A=[]          
for i in range(N-K+1):
            A.append(sum(p_[i:i+K]))
print(max(A))


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

Verdicts: Runtime Error

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

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

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

print (str(A) + ',' + str(B))


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

if U == S:
	A = A-1
else:
  B = 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 = 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)
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):
from sys import stdin

s = stdin.readline().rstrip()

r = ""
for i in range(len(s)):
    r += "x"

print(r)

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


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

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):
    a -= 1
else:
    b -= 1


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

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

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

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

Verdicts: 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 = input()
w = ""
for i in range(len(S)):
    w += "x"
print(w)

wrd = input().split()
AB = input().split()
U = input()

num = list(map(int, AB))

if wrd[0]==U:
    num[0] -=1
else:
    num[1] -=1

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

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

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

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

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:
    A-=1
elif U==T:
    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
elif U==T:
    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()
dic={S:A,T:B}
dict[U]-1
print(dict[S] dict[T])

s,a,u=open(0);i=u in s;print(int(a[:2])-1+i,int(a[2:])-i)

Verdicts: Runtime Error

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

Submission attempts (in order):
S,T=input().split()
A,B=map(int,input().split())
U=input()
print(S, T)
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: Wrong Answer

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

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

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


Verdicts: Wrong Answer

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

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

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

s,t = input().split()
a,b = map(int,input().split())
u = input()
if u == s:
  a -= 1
else:
  b -= 1
print('{0} {1}'.format(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=list(input().split())
a,b=map(int,input().split())
print(a,b-1 if s.index(input())==1 else a-1,b)

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

def remaining_ball():
    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)
remaining_ball()

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(int(a-1)" "int(b))
else:
  print(int(a)" "int(b-1))

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

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

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

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

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

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

S, T = input().split()
a, b = input().split()
U = input()

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

if S==U:
  a-=1
if T==U:
  b-=1

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

Verdicts: Runtime Error

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

Submission attempts (in order):
num=list(map(int,input().split()))
nums=list(map(int, input().split()))
a=[0]*num[1]
max=-1
for i in nums:
    a.append((i+1)/2)
    a.pop(0)
    s=sum(a)
    if(s>max):
        max=s
print(max)

items=input().split()
nums=list(map(int, input().split()))
target=input()
if(target==items[0]):
    print(nums[0]-1,nums[1])
else:
    print(nums[0],nums[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, T = map(str, input().split())
A, B = map(int, input().split())
U = input()
if U == S :
    ans = A - 1
else :
    ans = B - 1
print(ans)

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

a = int(inputs[2])
b= int(inputs[3])

if inputs[4] == inputs[0]:
  a = a - 1
elif inputs[4] == inputs[1]:
  b = b - 1

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

import sys

msg = sys.stdin.readlines()
lines = list()

for item in msg:
    if " " in item:
        s, t = item.split()
        lines.append(s)
        lines.append(t)
    else:
        item = item.replace('\n','')
        lines.append(item)

a = int(lines[2])
b = int(lines[3])

if lines[4] == lines[0]:
    a = a - 1
elif lines[4] == lines[1]:
    b = b - 1

print("{0} {1}".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=list(map(str,input().split()))
a,b=list(map(int,input().split()))
u=str(input())

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

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

if s==u:
  a-=1
elif t==u:
  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()
n1, n2 = int(input()).split()
i = input()
if(i==s):
  return n1=n1-1
elif(i==t)
  return n2=n2-1
print(n1,n2)

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

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

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


import sys
input = sys.stdin.readline

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)

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

a, b = input().split()
na, nb = map(int, input().split())
c = input()
if a == c:
  print(na - 1, nb)
else:
  print(na, nb - 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(' '))
print(A+B-1)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
S = input()
char_list = list(S)
new_list=[]
for char  in char_list:
    char = "x"
    new_list.append(char)
output = "".join(new_list)
print(output)

N = int(input())
 A = [int(x) for x in input().split()]
for i in A:
   	if A.count(i) >= 2:
   	   print('YES')
       return
print('NO')

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

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 = map(int, input().split())
U = input()
if S == U:
    A -= 1
else if T == U:
    B -= 1
print(f'{str(A)} {str(B)}')

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

Verdicts: Runtime Error

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

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


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

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

s_len = len(s)
result = ''
while True:
    result += 'x'
    if len(result) == s_len:
        break

print(result)

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

if s[0] == u:
    a -= 1
else:
    b -= 1
print(str(a) + ' ' + str(b))

Verdicts: Wrong Answer

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

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

if s==u:
    print(a-1)

else:
    print(b-1)

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

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

# coding: utf-8
s,t = input().split()
a,b = map(int, input().split())
u = input()

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
#A

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


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

#A

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


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

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

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

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

Verdicts: 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):
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=[]
smax=0
for i in range(k-1,n):
    if i==k-1:
        sumnow=sum(a[:i+1])
    else:
        sumnow+=a[i]-a[i-k]
    smax=max(smax,sumnow)
print((smax+k)/2)

import numpy as np

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


Verdicts: Runtime Error

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

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

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

print(A, B)

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

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

print(A, B)

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

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

print(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):
color = input().split()
number = input().split()
choice = str(input())

for i in [0,1]:
  if choice == color[i]:
    number[i] -= 1
    
print(number[0],number[1])

color = input().split()
number = list(map(int,input().split()))
choice = str(input())
 
for i in [0,1]:
  if choice == color[i]:
    number[i] -= 1
    
print(number[0],number[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()))

for i in range(n):
    p[i] = (p[i]+1)/2

kset = 0
for j in range(k):
    kset += p[j] 

max = -10000
if n != k:
    for l in range(n-k):
        if kset >= max:
            max = kset
        kset = kset - p[l] + p[l+k]
else:
    max = kset
print(max)

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

Verdicts: Runtime Error

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

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

if u==s:
  a=a-1

if u==t:
  b=b-1

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


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

if u==s:
  a=a-1

if u==t:
  b=b-1

print(*[str(a)+" "+str(b)])


Verdicts: 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) = list(input().split())
(p, q) = list(input().split())
st = input()

if red == st:
  print( p-1+ " " +q )
else:
  print( p+ " " +q-1 )


(red, blue) = list(input().split())
(p, q) = list(map(int, input().split()))
st = input()

if red == st:
  print( str(p-1)+ " " +str(q) )
else:
  print( str(p)+ " " +str(q-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 = intput().split()
a = list(map(int, input().split()))
u = input()

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

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

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

ans = A + B

if S == U or T == U:
    ans -= 1

print(ans)


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

if S == U:
    A -= 1
    U = '0'

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

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a = input().split()

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

c = input()

if c == a[0] && :
  b[0]-=1
elif c == a[1]:
  b[1]-=1

if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))

a = input().split()
 
b = [int(x) for x in input().split()]
 
c = input()
 
if c == a[0]:
  b[0]-=1
elif c == a[1]:
  b[1]-=1
 
if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))


Verdicts: Runtime Error

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

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

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


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


n=int(input())
a=set(map(int,input().split()))
print("YES") if len(a)==n else print("NO")

n=int(input())
a=set(map(int,input().split()))
print("YES") if len(a)==n else print("No")

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


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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N, K = map(int, input().split())
pi = list(map(int, input().split()))
index = []
for i in range(N-K+1):
    x = sum(pi[i:i+K])
    index.append(x)
max_index = index.index(max(index))
EX_max = 0
for i in range(max_index, max_index+K):
  EX_max += 1+(pi[i]-1)*0.5
print(EX_max)

import numpy as np
N, K = map(int, input().split())
pi = list(map(int, input().split()))
K_sum = []
for i in range(N-K+1):
    K_sum.append(sum(pi[i:i+K])) 
index = K_sum.index(max(K_sum))
array_max = (np.array(pi[index:index+K])-1) *0.5 + 1
print(array_max.sum())

import numpy as np
def Expected_Value(x):
    EV = 0
    for i in range(1,x+1):
        EV += i/x
    return EV
N, K = map(int, input().split())
pi = np.array(list(map(int, input().split())))
ma = 0
for i in range(N-K+1):
    x = sum(pi[i:i+K])
    if x > ma:
        ma = x
        max_index = i
array_max = (np.array(pi[max_index:max_index+K])-1) *0.5 + 1
print(array_max.sum())

N, K = map(int, input().split())
pi = list(map(int, input().split()))
index = []
for i in range(N-K+1):
    x = sum(pi[i:i+K])
    index.append(x)
max_index = index.index(max(index))
EX_max = 0
for i in range(max_index, max_index+K):
  EX_max += 1+(pi[i]-1)*0.5
print(EX_max)

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

Verdicts: Runtime Error

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 = input()
a,b = (A.split(' '))
B = input()
c,d = (B.split(' '))
e = int(c)
f = int(d)
C = input()

if A == C:
    print('{} {}'.format(e-1,f))
else:
    print('{} {}'.format(e,f-1))


A = input()
a,b = (A.split(' '))
B = input()
c,d = (B.split(' '))
e = int(c)
f = int(d)
C = input()

if a == C:
    print('{} {}'.format(e-1,f))
else:
    print('{} {}'.format(e,f-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:
    print(a-1)
else:
    pritn(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:
    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 = map(input().split())
a, b = map(int, input().split())
u = input()

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


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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
N = int(input())
lis = list(map(int,input().split()))
x = 0
lis.sort()
for i in range(0,N+1):
        if lis[i] == lis[i+1]:
                x = 1
                break
if x == 0:
        print("YES")
else:
        print("NO")

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