Problem:


Score : 100 points

Problem Statement

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.

Constraints

S, T, and U are strings consisting of lowercase English letters.

The lengths of S and T are each between 1 and 10 (inclusive).

S \not= T

S=U or T=U.

1 \leq A,B \leq 10

A and B are integers.

Input

Input is given from Standard Input in the following format:

S T
A B
U

Output

Print the answer, with space in between.

Sample Input 1

red blue
3 4
red

Sample Output 1

2 4

Takahashi chose a ball with red written on it and threw it away.
Now we have two balls with the string S and four balls with the string T.

Sample Input 2

red blue
5 5
blue

Sample Output 2

5 4

Takahashi chose a ball with blue written on it and threw it away.
Now we have five balls with the string S and four balls with the string T.



Sample input:
red blue
3 4
red


Sample output:
2 4

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
S, T = map(input().split())
A, B = map(int, input().split())
U = input()
ans = 0

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std; inline void fileio(const char* in, const char* out) { freopen(in, "r", stdin); freopen(out, "w", stdout); } 
#define TD typedef
#define forx(i,n) for(int i = 0; i < (n); ++i)
#define forxr(i,n) for(int i = (n)-1; i >= 0; --i)
TD long long ll; TD long double ld; TD pair<int,int> pii; TD pair<ll,ll> pll; TD vector<int> VI; TD vector<bool> VB; TD vector<ll> VL;
const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; const ld EPS = 1e-9, PI = acos(-1);
#define ff first
#define ss second
#define all(c) c.begin(),c.end()

int main() {
  atexit([](){ cerr << "Time: " << (ld)clock() / CLOCKS_PER_SEC << nl; });
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  cout << fixed << setprecision(12);
  // Emily <3
  string s,t;
  cin >> s >> t;
  int a,b; cin >> a >> b;
  string x;
  cin >> x;
  if (x == s) {
    a--;
  } else {
    b--;
  }
  cout << a << " " << b << nl;
  return 0;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
Last login: Wed Mar  4 17:18:27 on ttys000
~ tmux
zsh: command not found: tmux
~ brew install tmux
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
ccm          fobis        gcovr        gitlab-gem   nginx        passenger

==> Installing dependencies for tmux: utf8proc
==> Installing tmux dependency: utf8proc
==> Downloading https://homebrew.bintray.com/bottles/utf8proc-2.4.0.catalina.bot
######################################################################## 100.0%
==> Pouring utf8proc-2.4.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/utf8proc/2.4.0: 10 files, 648.1KB
==> Installing tmux
==> Downloading https://homebrew.bintray.com/bottles/tmux-3.0a_1.catalina.bottle
==> Downloading from https://akamai.bintray.com/d8/d83b378969a8af595451db10bf4b8
######################################################################## 100.0%
==> Pouring tmux-3.0a_1.catalina.bottle.tar.gz
==> Caveats
Example configuration has been installed to:
  /usr/local/opt/tmux/share/tmux

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/tmux/3.0a_1: 9 files, 803.1KB
==> Caveats
==> tmux
Example configuration has been installed to:
  /usr/local/opt/tmux/share/tmux

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
~ 
~ 
~ 
~ tmux ls
error connecting to /tmp//tmux-501/default (No such file or directory)
~ tmux
[exited]
~ tmux new -s normal
[exited]
~ 
~ 
~ 
~ 
~ cd
~ cd atcoder
~/atcoder ll
total 80
drwxr-xr-x    7 yoshidafumiya  staff    224  3  4 16:59 .
drwxr-xr-x+ 108 yoshidafumiya  staff   3456  3  4 17:28 ..
drwxr-xr-x    5 yoshidafumiya  staff    160  3  1 20:26 .ipynb_checkpoints
-rw-r--r--    1 yoshidafumiya  staff   3801  3  1 20:55 155.ipynb
-rw-r--r--    1 yoshidafumiya  staff  12413  3  1 17:28 156.ipynb
-rw-r--r--    1 yoshidafumiya  staff  15032  3  4 16:59 157.ipynb
-rw-r--r--    1 yoshidafumiya  staff    785  3  4 16:59 157c.py
~/atcoder mkdir 155
~/atcoder mv 155.ipynb 155
~/atcoder mkdir 156
~/atcoder mv 156.ipynb 156
~/atcoder mkdir 157
~/atcoder mv 157.ipynb 157
~/atcoder mv 157c.py 157
~/atcoder ll
total 0
drwxr-xr-x    6 yoshidafumiya  staff   192  3  4 17:47 .
drwxr-xr-x+ 108 yoshidafumiya  staff  3456  3  4 17:28 ..
drwxr-xr-x    5 yoshidafumiya  staff   160  3  1 20:26 .ipynb_checkpoints
drwxr-xr-x    3 yoshidafumiya  staff    96  3  4 17:47 155
drwxr-xr-x    3 yoshidafumiya  staff    96  3  4 17:47 156
drwxr-xr-x    4 yoshidafumiya  staff   128  3  4 17:47 157
~/atcoder mkdir 154
~/atcoder cd 154
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
redTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(int,input().split())
ValueError: invalid literal for int() with base 10: 'red'
~/atcoder/154 3 4
zsh: command not found: 3
~/atcoder/154 p a.py
^CTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(int,input().split())
KeyboardInterrupt
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
Traceback (most recent call last):
  File "a.py", line 3, in <module>
    u = int(input())
ValueError: invalid literal for int() with base 10: 'red'
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
2
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
('red', 2)
('blue', 4)
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
text = text[:-1]
Traceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(str,input().split())
ValueError: too many values to unpack (expected 2)
~/atcoder/154 p a.py
red blue
3 4
red
Traceback (most recent call last):
  File "a.py", line 13, in <module>
    ans = ans + value + ' '
TypeError: can only concatenate str (not "int") to str
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
2 4
~/atcoder/154 p a.py
red blue
5 5
blue
5 4
~/atcoder/154 p a.py
^CTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(str,input().split())
KeyboardInterrupt
~/atcoder/154 vi a.py

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

h1 = {}
h1[s] = a
h1[t] = b

h1[u] = h1[u] - 1

ans = ''
for key, value in h1.items():
    ans = ans + str(value) + ' '

ans = ans[:-1]
print(ans)

Submission status: Runtime Error

Solution code:
S,T=input().split()
A,B=(int(x) for x in input().split())
U = input()
 
if S == U:
  A = A - 1
  print(A +" " + B)
  
else:
  B = B - 1
  print(A + " " + B)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
T,S = map(str,input().split())
A,B = map(int,input().split())
U = input()
Z = [A+[0,-1][U == T],B+[0,-1][U == S]]
P = " ".join(Z)
print(P)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

N=int(input())
n=[int(i) for i in str(N)]
K=int(input())
L=len(n)
dp=np.zeros((L+1,2,K+1),dtype=int)
dp[0,0,0]=1

for i in range(L):
  for smaller in [0,1]:
    for j in range(0,K):
      m=10 if smaller else n[i]+1
      for x in range(m):
        if ( (j+(x!=0)) <= K )
          #i桁目がxだったときにdp[i][smaller][j]をどこに足しますか？
          dp[i+1][smaller or x<n[i]][j+(x!=0)]+=dp[i][smaller][j]
        
print(dp[L,:,K].sum())

Submission status: Runtime Error

Solution code:
s, t = intput().split("")
a, b = map(int, input().split(""))
u = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def wa(n):
    if n<=1:
        return 1
    else:
        return wa(n-1)+n

n,k=map(int,input().split())
a=list(map(int,input().split()))
b=[]
for i in a:
    b.append((i+1)/2)
max=0
for i in range(len(b)-k+1):
    sum=0
    for j in range(i,i+k):
        sum+=b[j]
    if max<=sum:
        max=sum
print(max)

Submission status: Runtime Error

Solution code:
    a, b = input().split()
    an, bn = map(int, input().split())
    s = input()

    d = {a: an, b:bn}
    d[s] -= 1

    print("{} {}".format(d[a], d[b]))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
res = "YES"
A.sort()
for i in range(len(A)):
    if i == 0:
        continue
    if A[i-1] == A[i]:
        res = "NO"
        break
    else:
        continue
print(res)

Submission status: Runtime Error

Solution code:
S,T = map(int,input().split())
A,B = map(int,input().split())
s = input()

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
p = list(map(int, input().split()))

res = -1

for i in range(N):
    res = p[i]

print(res)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
S,T=input().split()

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

U=input()

if S==U:
    A=A-1

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

print(A,B)

Submission status: Runtime Error

Solution code:
S,T=str(input())
A,B=str(input())
U=input()
if U==S:
  A-=1
else:
  B-=1
AN=[A,B]
print(*AN)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_texts = input()
text_list = input_texts.split(" ")
text_s = text_list[0]
text_t = text_list[1]

input_counts = input()
count_list = input_counts.split(" ")
count_s = int(count_list[0])
count_t = int(count_list[1])

pull_text = input()

if pull_text == text_s:
    count_s -= 1
else:
    count_t -= 1

print(f"{str(count_s)} {str(count_t)}")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

import numpy as np
import scipy as scp
import sklearn as skl

# 入力の受け取り
s,t = input().split()
a,b = map(int,input().split())
u = input()

dic = {s:a,t:b}

if u == s:
    dic[s] -= 1
else:
    dic[t] -= 1

print(dic[s],dic[t])

Submission status: Runtime Error

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

balls = {s:a, t:b}

for key in balls:
    if key == u:
        balls[key] = balls[key] - 1

listBalls = list(balls.values())
print(f'{listBalls[0]} {listBalls[1]}')

Submission status: Runtime Error

Solution code:
s,t = input().split()
sn,tn = map(int,input().split())
u  = input()

if s == u:
    print((sn-1) + ' '+ tn)
else:
    print(sn + ' ' + (tn-1))

Submission status: Runtime Error

Solution code:
s,t = input().split()
sn,tn = map(int,input().split())
u  = input()

if s == u:
	print((sn-1) ' '+ (tn))
else:
	print(sn + '' + (tn-1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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:

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import str
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  A-1
elif T==U:
  B-1
print(A,B)

Submission status: Runtime Error

Solution code:
import str
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  print(A-1 B)
elif T==U:
  print(A B-1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import numpy as np

N, K= map(int, input().split())
p = np.array(list(map(int, input().split())))

max = 0
for i in range(N-K+1):
    tmp = np.sum(p[i:i+K])
    if tmp>max:
        max = tmp

print((max+K)/2)

Submission status: Runtime Error

Solution code:
import  copy
N, K = map(int,input().split())
p = [int(i) for i in input().split()]
P = []
P_S = [0]
ans_list = []
temp = 0

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

print(max(ans_list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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(" "))

Submission status: Runtime Error

Solution code:
s,t=input().split(" ")
a,b.=map(int,input().split(" "))
u=input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
max=0
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K+1):
    x=0
    for j in range(K):
        x+=s[i+j]
    if max<x :
        max=x
print((max+K)/2)

Submission status: Runtime Error

Solution code:
S,T = input().split()
cnt = [int(i) for i input().split()]
U = input()

if U == S:
  cnt[0] -= 1
else:
  cnt[1] -= 1

print(" ".join(cnt))

Submission status: Runtime Error

Solution code:
import numpy as np
N, K = map(int, input().split(" "))
p = np.array(list(map(int, input().split(" "))))
ex = np.array([(i + 1) / 2 for i in p])
ans = np.sum(ex[0: K])
max_ans = ans
for i in range(K, N):
    diff = ex[i] - ex[i - K]
    ans += diff
    if diff > 0:
        max_ans = ans
print(max_ans)

Submission status: Runtime Error

Solution code:
t=list(input())
n=int((len(t)+1)//2)+1
p=0
for i in range(1,n):
    for j in range(1,i):
        if t[2*i]==t[2*j]:
            p+=1
if p>0:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s,t=input().split()
a,b=map(int,input()split())
u=input()
if u==s:
    a--
elif u==t:
    b--
print({} {},format(a,b))

Submission status: Runtime Error

Solution code:
import numpy as np

N, K = map(int, input().split())
p = (np.array(list((map(int, input().split())))) + 1) / 2

ans = 0

for num in range(len(p)):
    tmp = p[num:num+K].sum()
    if ans < tmp:
        ans = tmp

print(float(ans))

Submission status: Runtime Error

Solution code:

def dyn(n,d00,d01,d02,d03,d10,d11,d12,d13):
    D00 = d00 + d10*int(n != 0)
    D10 = d10*int(n==0)
    D01 = d00*9 + d10*(n-1+int(n==0)) + d01 + d11*int(n!=0)
    D11 = d10*(int(n!=0)) + d11*(int(n==0))
    D02 = d01*9 + d11*(n-1+int(n==0)) + d02 + d12*int(n!=0)
    D12 = d11*(int(n!=0)) + d12*(int(n==0))
    D03 = d02*9 + d12*(n-1+int(n==0)) + d03 + d13*int(n!=0)
    D13 = d12*(int(n!=0)) + d13*(int(n==0))
    return D00,D01,D02,D03,D10,D11,D12,D13

N = str(input())
K = int(input())
S = len(N)
D00=0
D01=0
D02=0
D03=0
D10=1
D11=0
D12=0
D13=0

for i in range(S):
    [D00,D01,D02,D03,D10,D11,D12,D13] = dyn(int(N[i]),D00,D01,D02,D03,D10,D11,D12,D13)
    print(int(N[i]),D00,D01,D02,D03,D10,D11,D12,D13)
if K == 1:
    print(D01+D11)
elif K==2:
    print(D02+D12)
else:
    print(D03+D13)

Submission status: Runtime Error

Solution code:
words = stdin.readline().rstrip().split()
cards  = [int(x) for x in stdin.readline().rstrip().split()]
drop   = stdin.readline().rstrip()

if drop == words[0]:
    cards[0] -= 1
    print(str(cards[0]) + " " + str(cards[1]))
elif drop == words[1]:
    cards[1] -= 1
    print(str(cards[0]) + " " + str(cards[1]))

Submission status: Runtime Error

Solution code:
words = stdin.readline().rstrip().split()
cards  = [int(x) for x in stdin.readline().rstrip().split()]
drop   = stdin.readline().rstrip()

if drop == words[0]:
    cards[0] -= 1
    print(cards[0] + " " + cards[1])
elif drop == words[1]:
    cards[1] -= 1
    print(cards[0] + " " + cards[1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
t = input()
a = int(input())
b = int(input())
u = input()


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

print(a,b)

Submission status: Runtime Error

Solution code:
s = input(S)
t = input(T)
a = input(A)
b = input(B)
u = input(U)

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

Submission status: Runtime Error

Solution code:
s = input()
t = input()
a = input()
b = input()
u = input()

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

Submission status: Runtime Error

Solution code:
s = input()
t = input()
a = input()
b = input()
u = input()

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

Submission status: Runtime Error

Solution code:
s = input(S)
t = input(T)
a = input(A)
b = input(B)
u = input(U)

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

Submission status: Runtime Error

Solution code:
s = input(S)
t = input(T)
a = input(A)
b = input(B)
u = input(U)

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

Submission status: Runtime Error

Solution code:
s = input(S)
t = input(T)
a = input(A)
b = input(B)
u = input(U)

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
P = [(int(x) + 1) / 2 for x in input().split()]
l = []
for i in range(N - K + 1):
    l.append(sum(P[i:(i+K)]))
print('{:.12f}'.format(max(l))) #12桁まで指定

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
S, T = str(input().split(' '))
A, B = int(input().split(' '))
U = str(input())

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

Submission status: Runtime Error

Solution code:
S, T, U = str(input().split(' '))
A, B = int(input().split(' '))

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

Submission status: Runtime Error

Solution code:
(red, blue) = list(input().split())
(p, q) = list(input().split())
st = input()

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

//INSERT ABOVE HERE
signed main(){
  string s,t;
  Int a,b;
  string u;
  cin>>s>>t>>a>>b>>u;
  if(s==u) a--;
  if(t==u) b--;
  cout<<a<<" "<<b<<endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
import sys
# import itertools
# import math

input = sys.stdin.readline().rstrip()


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

    if S == U:
        A -= 1
        print(str(A) + ' ' + str(B))
        return
    B -= 1
    print(str(A) + ' ' + str(B))


resolve()

Submission status: Runtime Error

Solution code:
s,t,a,b,u=input().split()
ar=int(a)
br=int(b)
if u==s: 
  ar=ar-1
else :
  br=br-1
print(str(ar)+" "+str(br))

Submission status: Runtime Error

Solution code:
,

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

data = {
    str(S): A,
    str(T): B,
}

data[str(U)] -= 1

s = data[str(S)]
t = data[str(T)]
print(f'{s} {t}')

Submission status: Runtime Error

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

data = {
    str(S): A,
    str(T): B,
}

data[f'{U}'] -= 1

s = data[str(S)]
t = data[str(T)]
print(f'{s} {t}')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
list1 = input()
list1 = list1.split(' ')
S = list1[0]
T = list1[1]
lenS = int(list1[2])
lenT = int(list1[3])
select = list1[4]
if select == S:
    lenS -= 1
else:
    lenT -= 1
print(lenS,lenT)

Submission status: Runtime Error

Solution code:
S,T= map(strinput().split())
A=len(S)
B=len(T)
ptint(A,{},B)
U =input()
if U==S:
  A-=S
elif U==T:
  B-=1
else:
  pass

Submission status: Runtime Error

Solution code:
a,b=input().spit()
d={}
d[a]=0
d[b]=0
d[a],d[b]=map(int,input().split())
x=input()
d[x]-=1
print(d[a],d[b])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s,t=map(str,input().split())
a,b=map(int,input().split())
q=input()
print("{x} {y}".format(a-1,b) if q==s else "{x} {y}".format(a,b-1))

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def method_name():
    s = input()
    t = input()
    a = int(input())
    b = int(input())
    u = input()
    
    if s == u:
      a = a-1
    elif t == u:
      b = b-1
    else:
      print('一致なし')
    
    print(s,t)
    print(a,b)
    print(u)
    return a, b, s, t, u

a, b, s, t, u = method_name()

Submission status: Runtime Error

Solution code:
s = input()
t = input()
a = int(input())
b = int(input())
u = input()

if s == u:
  a = a-1
elif t == u:
  b = b-1
else:
  print('一致なし')

print(s,t)
print(a,b)
print(u)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
p = list(map(int, input().split()))

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

print(maxexp)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(int(x) for x in input().split())
x = 0
for i in range(n):
    if a.count(a[i]) != 1:
        print("No")
        x = 1
        break
        
if x == 0:
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]

k = input()
ALL[k] -= 1
 
for i in range(len(s)):
  print(ALL[s[i]], end = ' ')

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]

ALL[input()] -= 1

for i in range(len(s)):
  print(ALL[s[i]], end = ' ')