problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02777
u428199834
2,000
1,048,576
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.
['N,K=map(int,input().split())\np=list(map(int,input().split()))\np_=[0]*N\nfor a in range(N):\n p_[a]=(1+p[a])/2\nA=[] \nfor i in range(N-K+1):\n A.append(sum(p_[i:i+K]))\nprint(max(A))\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif u==s:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Runtime Error', 'Accepted']
['s324360992', 's745278560']
[3060.0, 9092.0]
[17.0, 24.0]
[200, 103]
p02777
u432518223
2,000
1,048,576
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.
["S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n\tA = A-1\nelse:\n B = B-1\n\nprint (str(A) + ',' + str(B))\n", "S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n\tA = A-1\nelse:\n B = B-1\n\nprint (str(A) + ' ' + str(B))\n"]
['Wrong Answer', 'Accepted']
['s851912630', 's529838393']
[2940.0, 2940.0]
[17.0, 17.0]
[133, 133]
p02777
u436611990
2,000
1,048,576
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.
['S, T = input().split()\nA, B = map(int, input().split())\nU = input().split()\n\n\nif S == U:\n print(A-1, B)\nelse:\n print(A, B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S == U:\n print(A-1, B)\nelse:\n print(A, B-1)']
['Wrong Answer', 'Accepted']
['s519337920', 's889291452']
[2940.0, 2940.0]
[17.0, 17.0]
[130, 121]
p02777
u436664080
2,000
1,048,576
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.
['from sys import stdin\n\ns = stdin.readline().rstrip()\n\nr = ""\nfor i in range(len(s)):\n r += "x"\n\nprint(r)', 'from sys import stdin\n\ns, t = stdin.readline().rstrip().split()\na, b = [int(x) for x in stdin.readline().rstrip().split()]\nu = stdin.readline().rstrip().split()\n\nif (s == u):\n a -= 1\n \nif (t == u):\n b -= 1\n\n\nprint(str(a) + " " + str(b))', 'from sys import stdin\n\ns, t = stdin.readline().rstrip().split()\na, b = [int(x) for x in stdin.readline().rstrip().split()]\nu = stdin.readline().rstrip().split()\n\nif (s == u):\n a -= 1\nelse:\n b -= 1\n\n\nprint(str(a) + " " + str(b))', 'from sys import stdin\n\ns, t = stdin.readline().rstrip().split()\na, b = [int(x) for x in stdin.readline().rstrip().split()]\nu = stdin.readline().rstrip()\n\nif (s == u):\n a -= 1\n \nif (t == u):\n b -= 1\n\nprint(str(a) + " " + str(b))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s073282292', 's157138350', 's201439233', 's859741098']
[2940.0, 3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[107, 245, 233, 236]
p02777
u436725550
2,000
1,048,576
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.
['S = input()\nw = ""\nfor i in range(len(S)):\n w += "x"\nprint(w)', 'wrd = input().split()\nAB = input().split()\nU = input()\n\nnum = list(map(int, AB))\n\nif wrd[0]==U:\n num[0] -=1\nelse:\n num[1] -=1\n\nprint(num[0], num[1])']
['Wrong Answer', 'Accepted']
['s878855949', 's318036537']
[2940.0, 2940.0]
[18.0, 17.0]
[64, 154]
p02777
u437351386
2,000
1,048,576
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.
['s,t=list(input().split())\na,b=list(map(int,input().split()))\nu=input()\n \nif u==s:\n print(a-1)\nelse:\n print(b-1)', 's,t=list(input())\na,b=list(map(int,input().split()))\nu=input()\n\nif u==s:\n print(a-1)\nelse:\n print(b-1)', 's,t=list(input().split())\na,b=list(map(int,input().split()))\nu=input()\n \nif u==s:\n print(str(a-1)+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s257461267', 's457723544', 's245988037']
[2940.0, 2940.0, 3060.0]
[18.0, 17.0, 17.0]
[113, 104, 145]
p02777
u438189153
2,000
1,048,576
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.
['S,T=map(str,input().split())\nA,B=map(str,input().split())\nU=str(input())\nif U==S:\n A-=1\nelif U==T:\n B-=1\nprint(A, B)\n', 'S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=str(input())\nif U==S:\n A-=1\nelif U==T:\n B-=1\nprint(A, B)\n']
['Runtime Error', 'Accepted']
['s758296465', 's227898458']
[9032.0, 9164.0]
[22.0, 24.0]
[123, 123]
p02777
u440161695
2,000
1,048,576
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.
['S,T=input().split()\nA,B=map(int,input().split())\nU=input()\ndic={S:A,T:B}\ndict[U]-1\nprint(dict[S] dict[T])', 's,a,u=open(0);i=u in s;print(int(a[:2])-1+i,int(a[2:])-i)']
['Runtime Error', 'Accepted']
['s357216215', 's387819731']
[2940.0, 2940.0]
[19.0, 17.0]
[105, 57]
p02777
u442855260
2,000
1,048,576
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.
['S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nprint(S, T)\nif(U==S):\n print(A-1, B)\nelse:\n print(A, B-1)', 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif(U==S):\n print(A-1, B)\nelse:\n print(A, B-1)']
['Wrong Answer', 'Accepted']
['s682965294', 's842256117']
[2940.0, 2940.0]
[17.0, 18.0]
[122, 110]
p02777
u445624660
2,000
1,048,576
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.
['s, t = input().split()\na, b = map(int, input().split())\nu = input()\nprint(a-1 if u == s else b-1)', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n print(a - 1, b)\nelse:\n print(a, b - 1)\n']
['Wrong Answer', 'Accepted']
['s046266555', 's859083030']
[2940.0, 2940.0]
[17.0, 17.0]
[97, 125]
p02777
u446371873
2,000
1,048,576
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.
["s,t = map(int,input().split())\na,b = map(int,input().split())\nu = input()\nif u == s:\n a -= 1\nelse:\n b -= 1\nprint('{0} {1}'.format(a,b))", 's,t = map(int,input().split())\na,b = map(int,input().split())\nu = input()\nif u == s:\n a -= 1\nelse:\n b -= 1', "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n a -= 1\nelse:\n b -= 1\nprint('{0} {1}'.format(a,b))\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s012349262', 's030465788', 's357941397']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[137, 108, 129]
p02777
u446711904
2,000
1,048,576
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.
['s=list(input().split())\na,b=map(int,input().split())\nprint(a,b-1 if s.index(input())==1 else a-1,b)', 's=list(input().split())\na,b=map(int,input().split())\nprint(a,b-1) if s.index(input())==1 else print(a-1,b)']
['Wrong Answer', 'Accepted']
['s578224006', 's768226882']
[2940.0, 2940.0]
[17.0, 17.0]
[99, 106]
p02777
u447564882
2,000
1,048,576
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.
['ef remaining_ball():\n S,T=map(str,input().split())\n A,B=map(int,input().split())\n U=input()\n if U==S:\n A-=1\n else:\n B-=1\n print(A,B)\nremaining_ball()', 'def remaining_ball():\n S,T=map(str,input().split())\n A,B=map(int,input().split())\n U=input()\n if U==S:\n A-=1\n else:\n B-=1\n print(A,B)\nremaining_ball()']
['Runtime Error', 'Accepted']
['s439397090', 's533141168']
[2940.0, 2940.0]
[17.0, 17.0]
[181, 182]
p02777
u448720391
2,000
1,048,576
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.
['s,t=input().split(" ")\na,b.=map(int,input().split(" "))\nu=input()\n \nif s==u:\n print(int(a-1)" "int(b))\nelse:\n print(int(a)" "int(b-1))', 's,t=input().split(" ")\na,b.=map(int,input().split(" "))\nu=input()\n \nif s==u:\n print(a-1,b.split(" "))\nelse:\n print(a,b-1.split(" "))', 's,t=input().split(" ")\na,b.=map(int,input().split(" "))\nu=input()\n\nif s==u:\n print(a-1,b)\nelse:\n print(a,b-1)', 's,t=map(str,input().split(" "))\na,b=map(int,input().split(" "))\nu=str(input())\n\nif s==u:\n print(a-1" "b)\nelse:\n print(a" "b-1)', 's,t=input().split(" ")\na,b.=map(int,input().split(" "))\nu=input()\n \nif s==u:\n print(a-1, b)\nelse:\n print(a, b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu=str(input())\n\nif s==u:\n print(a-1 b)\nelse:\n print(a b-1)', 's,t=input().split(" ")\na,b=map(int,input().split(" "))\nu=input()\n \nif s==u:\n print(a-1, b)\nelse:\n print(a, b-1)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s546132800', 's682186020', 's811273878', 's887046359', 's951205948', 's972211768', 's263572240']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[136, 134, 111, 128, 114, 109, 113]
p02777
u450147945
2,000
1,048,576
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.
['S, T = map(input().split())\na, b = map(input().split())\nU = input()\n\nif S==U:\n a-=1\nelse:\n b-=1\n\nprint("{} {}".format(a, b))', 'S, T = input().split()\na, b = input().split()\nU = input()\n\na = int(a)\nb = int(b)\n\nif S==U:\n a-=1\nif T==U:\n b-=1\n\nprint("{} {}".format(a, b))']
['Runtime Error', 'Accepted']
['s102821508', 's874962592']
[3060.0, 3060.0]
[18.0, 17.0]
[130, 142]
p02777
u453137963
2,000
1,048,576
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.
['num=list(map(int,input().split()))\nnums=list(map(int, input().split()))\na=[0]*num[1]\nmax=-1\nfor i in nums:\n a.append((i+1)/2)\n a.pop(0)\n s=sum(a)\n if(s>max):\n max=s\nprint(max)', 'items=input().split()\nnums=list(map(int, input().split()))\ntarget=input()\nif(target==items[0]):\n print(nums[0]-1,nums[1])\nelse:\n print(nums[0],nums[1]-1)']
['Runtime Error', 'Accepted']
['s585315952', 's419456401']
[3060.0, 3060.0]
[17.0, 17.0]
[194, 159]
p02777
u453623947
2,000
1,048,576
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.
['S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = input()\nif U == S :\n ans = A - 1\nelse :\n ans = B - 1\nprint(ans)', 'S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = input()\nif U == S :\n A = A - 1\nelse :\n B = B - 1\nprint(A, B)']
['Wrong Answer', 'Accepted']
['s590230387', 's060707322']
[2940.0, 3060.0]
[17.0, 17.0]
[139, 136]
p02777
u453670616
2,000
1,048,576
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.
['inputs = list(map(str,input().split()))\n\na = int(inputs[2])\nb= int(inputs[3])\n\nif inputs[4] == inputs[0]:\n a = a - 1\nelif inputs[4] == inputs[1]:\n b = b - 1\n\nprint("{0} {1}".format(a, b))', 'import sys\n\nmsg = sys.stdin.readlines()\nlines = list()\n\nfor item in msg:\n if " " in item:\n s, t = item.split()\n lines.append(s)\n lines.append(t)\n else:\n item = item.replace(\'\\n\',\'\')\n lines.append(item)\n\na = int(lines[2])\nb = int(lines[3])\n\nif lines[4] == lines[0]:\n a = a - 1\nelif lines[4] == lines[1]:\n b = b - 1\n\nprint("{0} {1}".format(a, b))']
['Runtime Error', 'Accepted']
['s808392421', 's634736919']
[3060.0, 3064.0]
[17.0, 17.0]
[189, 391]
p02777
u460386402
2,000
1,048,576
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.
['s,t=list(map(str,input().split()))\na,b=list(map(int,input().split()))\nu=str(input())\n\nif s==u:\n a-=1\nelif t==u:\n b-=1\n \nprint(a b)', 's,t=list(map(str,input().split()))\na,b=list(map(int,input().split()))\nu=str(input())\n\nif s==u:\n a-=1\nelif t==u:\n b-=1\n \nprint(a,b)\n']
['Runtime Error', 'Accepted']
['s374406976', 's226642147']
[2940.0, 2940.0]
[17.0, 17.0]
[133, 134]
p02777
u460748766
2,000
1,048,576
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.
['s, t = input().split()\nn1, n2 = int(input()).split()\ni = input()\nif(i==s):\n return n1=n1-1\nelif(i==t)\n return n2=n2-1\nprint(n1,n2)', 'S, T = input().split()\nA ,B = input().split()\nU = str(input())\nif(U == S):\n A = int(A) - 1\nelif(U==T):\n B = int(B) -1\nprint(A,B)']
['Runtime Error', 'Accepted']
['s633568399', 's468842384']
[2940.0, 2940.0]
[18.0, 17.0]
[132, 133]
p02777
u467480147
2,000
1,048,576
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.
['import sys\ninput = sys.stdin.readline\n\nS, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1,B)\nelse:\n print(A,B-1)\n', 'import sys\ninput = sys.stdin.readline\n\nS, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1,B)\n\nif T==U:\n print(A,B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1,B)\nelse:\n print(A,B-1)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s723307418', 's949112266', 's525884419']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[153, 156, 114]
p02777
u468972478
2,000
1,048,576
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.
['a, b = input().split()\nna, nb = map(int, input().split())\nc = input()\nprint(na - 1, nb if c == "red" else na, nb - 1)', 'a, b = input().split()\nna, nb = map(int, input().split())\nc = input()\nif a == c:\n print(na - 1, nb)\nelse:\n print(na, nb - 1)']
['Wrong Answer', 'Accepted']
['s943822034', 's696728056']
[9088.0, 9100.0]
[28.0, 28.0]
[117, 126]
p02777
u474423089
2,000
1,048,576
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.
["S,T=input().split(' ')\nA,B=map(int,input().split(' '))\nprint(A+B-1)", "S,T=input().split(' ')\nA,B=map(int,input().split(' '))\nU=input()\nif U==S:\n print(A-1,B)\nelse:\n print(A,B-1)"]
['Wrong Answer', 'Accepted']
['s095977214', 's486347688']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 113]
p02777
u479484272
2,000
1,048,576
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.
['S = input()\nchar_list = list(S)\nnew_list=[]\nfor char in char_list:\n char = "x"\n new_list.append(char)\noutput = "".join(new_list)\nprint(output)', "N = int(input())\n A = [int(x) for x in input().split()]\nfor i in A:\n \tif A.count(i) >= 2:\n \t print('YES')\n return\nprint('NO')", "S,T = input().split()\nA,B = input().split()\nU = input()\nif U == S:\n A = int(A)-1\nelse:\n B = int(B)-1\nprint(str(A)+' '+str(B))"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s494549580', 's972052139', 's807330741']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 20.0]
[149, 137, 131]
p02777
u483304397
2,000
1,048,576
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.
["S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif S == U:\n A -= 1\nelse if T == U:\n B -= 1\nprint(f'{str(A)} {str(B)}')", "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif S == U:\n A -= 1\nelif T == U:\n B -= 1\nprint('{} {}'.format(A, B))"]
['Runtime Error', 'Accepted']
['s568645392', 's271381678']
[2940.0, 2940.0]
[17.0, 18.0]
[144, 141]
p02777
u485172913
2,000
1,048,576
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.
['s=input()\nt=input()\na=int(input())\nb=int(input())\nu=input()\nif(u==s):\n print(a-1,b)\nelif(u==t):\n print(a,b-1)\n \n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif(u==s):\n print(a-1,b)\nelif(u==t):\n print(a,b-1)\n \n']
['Runtime Error', 'Accepted']
['s023726642', 's868519062']
[2940.0, 2940.0]
[17.0, 17.0]
[121, 120]
p02777
u486286539
2,000
1,048,576
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.
["s = input()\n\ns_len = len(s)\nresult = ''\nwhile True:\n result += 'x'\n if len(result) == s_len:\n break\n\nprint(result)", "s = input().split(' ')\na, b = map(int, input().split())\nu = input()\n\nif s[0] == u:\n a -= 1\nelse:\n b -= 1\nprint(str(a) + ' ' + str(b))"]
['Wrong Answer', 'Accepted']
['s885387149', 's438707690']
[2940.0, 2940.0]
[17.0, 17.0]
[127, 139]
p02777
u486773779
2,000
1,048,576
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.
['s,t = map(str,input().split())\na,b = map(int,input().split())\nu=input()\n\nif s==u:\n print(a-1)\n\nelse:\n print(b-1)', "s,t = map(str,input().split())\na,b = map(int,input().split())\nu=input()\n\nif s==u:\n print(str(a-1)+' '+str(b))\n\nelse:\n print(str(a)+' '+str(b-1))"]
['Wrong Answer', 'Accepted']
['s836045314', 's952077106']
[9132.0, 9024.0]
[34.0, 27.0]
[118, 150]
p02777
u488127128
2,000
1,048,576
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.
['# coding: utf-8\ns,t = input().split()\na,b = map(int, input().split())\nu = input()\n\nif u == s:\n print(a-1)\nelse:\n print(b-1)', '# coding: utf-8\ns,t = input().split()\na,b = map(int, input().split())\nu = input()\n\nif u == s:\n print(a-1, b)\nelse:\n print(a,b-1)']
['Wrong Answer', 'Accepted']
['s017097341', 's848034114']
[2940.0, 2940.0]
[17.0, 18.0]
[129, 134]
p02777
u489155878
2,000
1,048,576
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.
['#A\n\nS,T=input().split()\nA,B=input().split()\nU=input()\n\n\nif S==U:\n A-=1\nelif T==U:\n B-=1\n \nprint(str(A)+" "+str(B))', '#A\n\nS,T=input().split()\nA,B=map(int,input().split())\nU=input()\n\n\nif S==U:\n A-=1\nelif T==U:\n B-=1\n \nprint(str(A)+" "+str(B))']
['Runtime Error', 'Accepted']
['s491452839', 's500739316']
[3060.0, 2940.0]
[19.0, 17.0]
[137, 146]
p02777
u489762173
2,000
1,048,576
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.
['S, T = input().split()\nA, B = list(map(int,input().split()))\nU = input()\n \nif U == S:\n print(A-1)\nelse:\n print(B-1)', 'S, T = input().split()\nA, B = input().split()\nU = input()\n\nif U == S:\n print(A-1)\nelse:\n print(B-1)', 'S, T = input().split()\nA, B = list(map(int,input().split()))\nU = input()\n \nif U == S:\n print("{} {}".format(A-1,B))\nelse:\n print("{} {}".format(A,B-1))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s078521297', 's419111799', 's125655103']
[3316.0, 3060.0, 3060.0]
[19.0, 26.0, 17.0]
[117, 101, 153]
p02777
u490489966
2,000
1,048,576
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.
['n,k=map(int,input().split())\na=list(map(int,input().split()))\nb=[]\nsmax=0\nfor i in range(k-1,n):\n if i==k-1:\n sumnow=sum(a[:i+1])\n else:\n sumnow+=a[i]-a[i-k]\n smax=max(smax,sumnow)\nprint((smax+k)/2)', 'import numpy as np\n\ns,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n a-=1\nelse:\n b-=1\nprint(a,b)\n']
['Runtime Error', 'Accepted']
['s883846205', 's662731907']
[3064.0, 12668.0]
[17.0, 149.0]
[221, 123]
p02777
u491330513
2,000
1,048,576
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.
['S, T = map(str,input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == T:\n A -= 1\nelse:\n B -= 1\n\nprint(A, B)', 'S, T = input().split()\nA, B = list(map(int, input().split()))\nU = input()\n\nif S == T:\n A -= 1\nelse:\n B -= 1\n\nprint(A, B)', 'S, T = map(str,input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == U:\n A -= 1\nelse:\n B -= 1\n\nprint(A, B)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s423192507', 's724534021', 's092922101']
[2940.0, 3316.0, 2940.0]
[18.0, 21.0, 18.0]
[134, 126, 134]
p02777
u493130708
2,000
1,048,576
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.
['color = input().split()\nnumber = input().split()\nchoice = str(input())\n\nfor i in [0,1]:\n if choice == color[i]:\n number[i] -= 1\n \nprint(number[0],number[1])', 'color = input().split()\nnumber = list(map(int,input().split()))\nchoice = str(input())\n \nfor i in [0,1]:\n if choice == color[i]:\n number[i] -= 1\n \nprint(number[0],number[1])']
['Runtime Error', 'Accepted']
['s059194549', 's944361358']
[3060.0, 2940.0]
[17.0, 20.0]
[163, 179]
p02777
u493318999
2,000
1,048,576
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.
['n,k = map(int,input().split())\np = list(map(int,input().split()))\n\nfor i in range(n):\n p[i] = (p[i]+1)/2\n\nkset = 0\nfor j in range(k):\n kset += p[j] \n\nmax = -10000\nif n != k:\n for l in range(n-k):\n if kset >= max:\n max = kset\n kset = kset - p[l] + p[l+k]\nelse:\n max = kset\nprint(max)', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Runtime Error', 'Accepted']
['s547735493', 's284375397']
[3064.0, 2940.0]
[17.0, 17.0]
[319, 111]
p02777
u495723050
2,000
1,048,576
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.
['s,t=input().split()\na,b=map(int,input().split())\nu=input()\n\nif u==s:\n a=a-1\n\nif u==t:\n b=b-1\n\nprint([str(a)+" "+str(b)])\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\n\nif u==s:\n a=a-1\n\nif u==t:\n b=b-1\n\nprint(*[str(a)+" "+str(b)])\n']
['Wrong Answer', 'Accepted']
['s433131239', 's090902701']
[2940.0, 2940.0]
[17.0, 17.0]
[123, 124]
p02777
u498575211
2,000
1,048,576
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.
['(red, blue) = list(input().split())\n(p, q) = list(input().split())\nst = input()\n\nif red == st:\n print( p-1+ " " +q )\nelse:\n print( p+ " " +q-1 )\n', '(red, blue) = list(input().split())\n(p, q) = list(map(int, input().split()))\nst = input()\n\nif red == st:\n print( str(p-1)+ " " +str(q) )\nelse:\n print( str(p)+ " " +str(q-1) )\n']
['Runtime Error', 'Accepted']
['s705533521', 's195886317']
[2940.0, 2940.0]
[17.0, 17.0]
[147, 177]
p02777
u499832992
2,000
1,048,576
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.
['s = intput().split()\na = list(map(int, input().split()))\nu = input()\n\nif u == s[0]:\n print(a[0]-1, a[1])\nelse:\n print(a[0], a[1]-1)', 's = input().split()\na = list(map(int, input().split()))\nu = input()\n\nif u == s[0]:\n print(a[0]-1, a[1])\nelse:\n print(a[0], a[1]-1)']
['Runtime Error', 'Accepted']
['s524542979', 's623062965']
[2940.0, 3060.0]
[17.0, 17.0]
[137, 136]
p02777
u500297289
2,000
1,048,576
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.
['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nans = A + B\n\nif S == U or T == U:\n ans -= 1\n\nprint(ans)\n', "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S == U:\n A -= 1\n U = '0'\n\nif T == U:\n B -= 1\n\nprint(A, B)\n"]
['Wrong Answer', 'Accepted']
['s512713118', 's132437707']
[2940.0, 2940.0]
[17.0, 17.0]
[128, 139]
p02777
u500990280
2,000
1,048,576
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.
['S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif S == U:\n print({},{}).format(A-1,B)\nelse:\n print({},{}).format(A,B-1)', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n \nif S == U :\n print("{} {}".format(A-1,B))\nelse :\n print("{} {}".format(A,B-1))']
['Runtime Error', 'Accepted']
['s373264950', 's829632748']
[3060.0, 2940.0]
[17.0, 17.0]
[140, 151]
p02777
u502649733
2,000
1,048,576
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.
['import sys\nn = int(input())\na = list(map(int,input().split()))\n\'\'\'\nfor num in a:\n i = a.index(num)\n if(num in a[i+1:]):\n print("NO")\n sys.exit()\nprint("YES")\n\'\'\'\n\ni=0\nwhile(i<n):\n if(a[i] in a[i+1:]):\n print("NO")\n sys.exit()\n i += 1\nprint("YES")', 's, t = map(str,input().split())\t\na, b = map(int,input().split())\t\nu = input()\nif(s == u):\n a -= 1;\nelif(t == u):\n b -= 1;\nprint("{} {}".format(a, b))']
['Runtime Error', 'Accepted']
['s047942830', 's623914925']
[3060.0, 2940.0]
[17.0, 18.0]
[262, 151]
p02777
u506854696
2,000
1,048,576
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.
['a = input().split()\n\nb = [int(x) for x in input().split()]\n\nc = input()\n\nif c == a[0] && :\n b[0]-=1\nelif c == a[1]:\n b[1]-=1\n\nif b[0] < 0:\n b[0] = 0\nif b[1] < 0:\n b[1] = 0\nprint("{} {}".format(*b))', 'a = input().split()\n \nb = [int(x) for x in input().split()]\n \nc = input()\n \nif c == a[0]:\n b[0]-=1\nelif c == a[1]:\n b[1]-=1\n \nif b[0] < 0:\n b[0] = 0\nif b[1] < 0:\n b[1] = 0\nprint("{} {}".format(*b))\n']
['Runtime Error', 'Accepted']
['s320998312', 's701341622']
[2940.0, 3060.0]
[17.0, 17.0]
[201, 202]
p02777
u507113442
2,000
1,048,576
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.
['s,t=input().split()\na,b=map(int,input().split())\nu=input()\nprint(a-1 b if s==u else a b-1)', 's=input() u=input()\na,b=map(int,input().split())\nu=input()\nprint(a-1 b if s==u else a b-1)\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nprint(a-1 b if u==s else a b-1)\n', 'n=int(input())\na=set(map(int,input().split()))\nprint("YES") if len(a)==n else print("NO")', 'n=int(input())\na=set(map(int,input().split()))\nprint("YES") if len(a)==n else print("No")', 's=input(),u=input()\na,b=map(int,input().split())\nu=input()\nprint(a-1 b if s==u else a b-1)\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nprint(a-1, b) if u==s else print(a, b-1)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s278696735', 's333618610', 's516207409', 's577087908', 's858485650', 's863266670', 's802055403']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0]
[90, 91, 91, 89, 89, 91, 99]
p02777
u507145838
2,000
1,048,576
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.
['S,T = input.split()\nA,B = map(int, input().split())\nU = input()\n\nif S == U:\n A -= 1\nelse:\n B -= 1\n \nprint(A,B)', 'S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n \nif S == U:\n A -= 1\nelse:\n B -= 1\n \nprint(A,B)']
['Runtime Error', 'Accepted']
['s645746145', 's462739027']
[2940.0, 2940.0]
[18.0, 17.0]
[113, 116]
p02777
u509392332
2,000
1,048,576
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.
['N, K = map(int, input().split())\npi = list(map(int, input().split()))\nindex = []\nfor i in range(N-K+1):\n x = sum(pi[i:i+K])\n index.append(x)\nmax_index = index.index(max(index))\nEX_max = 0\nfor i in range(max_index, max_index+K):\n EX_max += 1+(pi[i]-1)*0.5\nprint(EX_max)', 'import numpy as np\nN, K = map(int, input().split())\npi = list(map(int, input().split()))\nK_sum = []\nfor i in range(N-K+1):\n K_sum.append(sum(pi[i:i+K])) \nindex = K_sum.index(max(K_sum))\narray_max = (np.array(pi[index:index+K])-1) *0.5 + 1\nprint(array_max.sum())', 'import numpy as np\ndef Expected_Value(x):\n EV = 0\n for i in range(1,x+1):\n EV += i/x\n return EV\nN, K = map(int, input().split())\npi = np.array(list(map(int, input().split())))\nma = 0\nfor i in range(N-K+1):\n x = sum(pi[i:i+K])\n if x > ma:\n ma = x\n max_index = i\narray_max = (np.array(pi[max_index:max_index+K])-1) *0.5 + 1\nprint(array_max.sum())', 'N, K = map(int, input().split())\npi = list(map(int, input().split()))\nindex = []\nfor i in range(N-K+1):\n x = sum(pi[i:i+K])\n index.append(x)\nmax_index = index.index(max(index))\nEX_max = 0\nfor i in range(max_index, max_index+K):\n EX_max += 1+(pi[i]-1)*0.5\nprint(EX_max)', "S, T = map(str,input().split())\nA, B = map(int,input().split())\nU = input()\nif U == S:\n A -= 1\nelse:\n B -= 1\nprint(str(A) +' '+ str(B))"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s042242322', 's111679528', 's483132540', 's817512190', 's454686566']
[3060.0, 12484.0, 12480.0, 3064.0, 2940.0]
[17.0, 149.0, 152.0, 17.0, 17.0]
[275, 264, 380, 275, 141]
p02777
u514118270
2,000
1,048,576
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.
["A = input()\na,b = (A.split(' '))\nB = input()\nc,d = (B.split(' '))\ne = int(c)\nf = int(d)\nC = input()\n\nif A == C:\n print('{} {}'.format(e-1,f))\nelse:\n print('{} {}'.format(e,f-1))\n", "A = input()\na,b = (A.split(' '))\nB = input()\nc,d = (B.split(' '))\ne = int(c)\nf = int(d)\nC = input()\n\nif a == C:\n print('{} {}'.format(e-1,f))\nelse:\n print('{} {}'.format(e,f-1))\n"]
['Wrong Answer', 'Accepted']
['s832848375', 's623179019']
[2940.0, 3060.0]
[17.0, 17.0]
[184, 184]
p02777
u516579758
2,000
1,048,576
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.
['s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1)\nelse:\n pritn(b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1)\nelse:\n print(b-1)\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n a-=1\nelse:\n b-=1\nprint(a,b)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s283344591', 's632025625', 's463204709']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[103, 104, 102]
p02777
u517621096
2,000
1,048,576
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.
['s, t = map(input().split())\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n print(a - 1, b)\nelse:\n print(a, b-1)\n', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n print(a - 1, b)\nelse:\n print(a, b-1)\n']
['Runtime Error', 'Accepted']
['s605338215', 's333949385']
[2940.0, 2940.0]
[18.0, 17.0]
[129, 124]
p02777
u521271655
2,000
1,048,576
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.
['N = int(input())\nlis = list(map(int,input().split()))\nx = 0\nlis.sort()\nfor i in range(0,N+1):\n if lis[i] == lis[i+1]:\n x = 1\n break\nif x == 0:\n print("YES")\nelse:\n print("NO")', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\nif U == S:\n print(A-1,B)\nelse:\n print(A,B-1)']
['Runtime Error', 'Accepted']
['s057996239', 's601404141']
[3060.0, 2940.0]
[17.0, 17.0]
[226, 123]
p02777
u523957440
2,000
1,048,576
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.
['S, T = input().split()\nA, B = map(int, input().split())\nU = int(input())\n\nif S == U:\n print (str(A-1)+" "+str(B))\nelse:\n print (str(A)+" "+str(B-1))', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n \nif S == U:\n print (str(A-1)+" "+str(B))\nelse:\n print (str(A)+" "+str(B-1))']
['Runtime Error', 'Accepted']
['s951835040', 's566011735']
[2940.0, 2940.0]
[17.0, 17.0]
[150, 146]
p02777
u524534026
2,000
1,048,576
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.
['n,t = input().split()\na,b = map(int,input().split())\nprint(a)\nu = input()\nif u == n:\n print(a-1,b)\nelse:\n print(a,b-1)', 'n,t = input().split()\na,b = map(int,input().split())\nprint(a)\nu = input()\nif u == n:\n print(a-1)\nelse:\n print(b-1)', 'n,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == n:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s254879980', 's600362305', 's374426248']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0]
[124, 120, 115]
p02777
u529500825
2,000
1,048,576
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.
['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nC = 0\nif S == U:\n C = A - 1\nelif T == U:\n C = B - 1\nelse:\n A = A\n\nprint(C)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nC = 0\nif S == U:\n C = A - 1\nelif T == U:\n C = B - 1\nelse:\n\tA = A\n\nprint(C)\nprint(S,T,A,B,U)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nC = 0\nD = 0\nif S == U:\n C = A - 1\n D = B\nelif T == U:\n D = B - 1\n C = A\nelse:\n A = A\n\nprint(C, D)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s399036836', 's722344598', 's896512389']
[2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[151, 165, 180]
p02777
u530883476
2,000
1,048,576
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.
['S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n\nif S==U :\n print(str(A-1)+"\u3000"+str(B))\nelif T==U :\n print(str(A)+"\u3000"+str(B-1))\n', 'S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n\nif S==U :\n print(str(A-1)+"\u3000"+str(B))\nelse :\n print(str(A)+"\u3000"+str(B-1))\n', 'S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n\nif S==U :\n print(str(A-1)+"\u3000"+str(B))\nelse :\n print(str(A)+"\u3000"+str(B-1))\n', 'S,T = input().split()\nA,B = map(int,input().split())\nU=input()\n\nif S==U:\n\tprint(str(A-1)+" "+str(B))\nelif T==U :\n\tprint(str(A)+" "+str(B-1))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s389597325', 's482548812', 's957326439', 's717219503']
[2940.0, 2940.0, 2940.0, 2940.0]
[19.0, 19.0, 17.0, 17.0]
[151, 146, 146, 140]
p02777
u534081198
2,000
1,048,576
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.
['S, T = input().split()\ns_i, t_i = map(int, input().split())\nU = input()\n\nif U == S:\n print(str(s_i - 1) + " " + str(t_i))\nelse\n print(str(s_i) + " " + str(t_i - 1))', 'S, T = input().split()\ns_i, t_i = map(int, input().split())\nU = input()\n\nif U == S:\n print(str(s_i - 1) + " " + str(t_i))\nelse:\n print(str(s_i) + " " + str(t_i - 1))']
['Runtime Error', 'Accepted']
['s637936073', 's682486051']
[2940.0, 2940.0]
[17.0, 17.0]
[170, 171]
p02777
u538405269
2,000
1,048,576
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.
['S,T = input().split()\nA,B = map(int,input().split())\nu = input()\nprint(S,T,u)\nif S == u:\n print(A-1, B)\nelif T == u:\n print(A, B-1)\n', 'S,T = input().split()\nA,B = map(int,input().split())\nu = input()\nif S == u:\n print(A-1, B)\nelif T == u:\n print(A, B-1)\n']
['Wrong Answer', 'Accepted']
['s488657622', 's960935671']
[2940.0, 2940.0]
[17.0, 17.0]
[138, 125]
p02777
u538844871
2,000
1,048,576
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.
["S, T, U = str(input().split(' '))\nA, B = int(input().split(' '))\n\nif S == U:\n A -= 1\nif T == U:\n B -= 1\nprint(A, B)", 'S, T = str(input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == U:\n print(A - 1, B)\nif T == U:\n print(A, B - 1)\n', "S, T = str(input().split(' '))\nA, B = int(input().split(' '))\nU = str(input())\n\nif S == U:\n A -= 1\nif T == U:\n B -= 1\nprint(A, B)\n", 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S == U:\n print(A - 1, B)\nelse:\n print(A, B - 1)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s055460410', 's574089278', 's993347340', 's372861349']
[2940.0, 2940.0, 3188.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[117, 137, 132, 122]
p02777
u540409459
2,000
1,048,576
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.
["s, t = input().split(' ')\na, b = list(map(int, input().split(' ')))\nu = input()\n\nm = {s: a, t: b}\nprint(m[u]-1)\n", "s, t = input().split(' ')\na, b = list(map(int, input().split(' ')))\nu = input()\n\nif u.__eq__(s):\n print(a-1)\nelse:\n print(b-1)\n", "s, t = input().split(' ')\na, b = map(int, input().split(' '))\nu = input()\n\nm = {s: a, t: b}\nprint(m[u]-1)\n", "s, t = input().split(' ')\na, b = list(map(int, input().split(' ')))\nu = input()\n\nm = {s: a, t: b}\nprint(m[u]-1)\n", 's, t = input().split(\' \')\na, b = list(map(int, input().split(\' \')))\nu = input()\n\nif s == u:\n print("{} {}".format(a-1, b))\nelse:\n print("{} {}".format(a, b-1))\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s461011842', 's679591068', 's700351309', 's944603532', 's092880647']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[112, 133, 106, 112, 166]
p02777
u542267798
2,000
1,048,576
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.
['str_list = input().split()\nstr_dic = {str_list[0]:int(input()),str_list[1]:int(input())}', 'str_list = input().split()\nnum_list = [int(i) for i in input().split()]\ndel_boll = input()\n\nboll_dic = {str_list[0]:num_list[0],str_list[1]:num_list[1]}\nboll_dic[del_boll] -= 1\n\nprint(boll_dic[str_list[0]],boll_dic[str_list[1]])']
['Runtime Error', 'Accepted']
['s885497335', 's141827274']
[2940.0, 3060.0]
[18.0, 17.0]
[88, 229]
p02777
u545368057
2,000
1,048,576
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.
['red blue\n5 5\nblue', 'S,T = input().split()\na,b = map(int, input().split())\nU = input()\nif U == S:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Runtime Error', 'Accepted']
['s987716406', 's535128281']
[2940.0, 2940.0]
[17.0, 17.0]
[17, 116]
p02777
u546853743
2,000
1,048,576
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.
["\ns = input()\na = len(s)\nprint('x'*a)", '\ns,t=map(str,input().split())\na,b=map(int,input().split())\nu=str(input())\nif s==u:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Wrong Answer', 'Accepted']
['s865032339', 's987066148']
[9036.0, 9116.0]
[30.0, 26.0]
[36, 122]
p02777
u549211107
2,000
1,048,576
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.
['N,K=map(int,input().split())\nl=list(map(int,input().split()))\na=[]\nfor i in range(N-K+1):\n b=sum(l[i:i+K])+K\n a.append(b)\n b=0\nprint(max(a)/2)\n', 's,t=map(str,input().split())\na,b=map(int,input().split())\nu=str(input())\nif s==u:\n a=a-1\nif t==u:\n b=b-1\nprint(a,b)']
['Runtime Error', 'Accepted']
['s293474802', 's078953154']
[2940.0, 2940.0]
[17.0, 17.0]
[152, 121]
p02777
u549383771
2,000
1,048,576
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.
['n,k = map(int,input().split())\nnum_list = list(map(int , input().split()))\ncandidate = 0\nfor i in range(n-k):\n if i == 0:\n for j in range(k):\n candidate += (num_list[j]+1)/2\n tmp = candidate\n else:\n tmp += -(num_list[i-1]+1)/2 + (num_list[i+k]+1)/2\n if tmp > candidate:\n candidate = tmp\n \nprint(candidate)', "s,t = input().split()\nnum_s,num_t =map(int,input().split())\nu = input()\nif u == s:\n num_s -= 1\nelse:\n num_t -= 1\nprint('{0} {1}'.format(num_s , num_t))"]
['Runtime Error', 'Accepted']
['s268862438', 's775688266']
[3060.0, 2940.0]
[17.0, 17.0]
[368, 157]
p02777
u550535134
2,000
1,048,576
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.
['S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint(A-1 B if U == S else A B)\n', 'S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint("S-1 T" if U == S else "S T-1")\n', 'S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint(S-1 T if U == S else S T-1)', 'S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint("A-1 B" if U == S else "A B")\n', 'S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint(A-1 B if U == S else A B-1)\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint("S-1 T" if U == S else "S T-1")\n', 'S, T = map(input().split())\nA, B = map(int, input().split())\nU = input()\n\nprint("A-1 B" if U == S else "A B-1")\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint(A-1, B) if U == S else print(A, B-1)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s035099221', 's039002605', 's218382026', 's767826944', 's892349446', 's904157805', 's951886607', 's765093244']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[106, 112, 107, 110, 108, 107, 112, 112]
p02777
u550708243
2,000
1,048,576
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.
['S, T = input().split()\nA, B = input().split()\nU = input()\nA, B = int(A), input(B)\n\nif U == S:\n A -= 1\nelif U == T:\n B -= 1\n\nprint(A, B)', 'S, T = input().split()\nA, B = input().split()\nU = input()\nA, B = int(A), int(B)\n\nif U == S:\n A -= 1\nelif U == T:\n B -= 1\n\nprint(A, B)']
['Runtime Error', 'Accepted']
['s040182416', 's586668155']
[3060.0, 2940.0]
[19.0, 18.0]
[141, 139]
p02777
u552201227
2,000
1,048,576
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.
['S,T = map(input().split())\nA,B = map(int,input().split())\nU = input()\nif(S==U):\n print(A-1,B)\nelse:\n print(A,B-1)\n', 'S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif(S==U):\n print(A-1,B)\nelse:\n print(A,B-1)\n']
['Runtime Error', 'Accepted']
['s874821835', 's748121646']
[2940.0, 2940.0]
[17.0, 17.0]
[116, 120]
p02777
u552533086
2,000
1,048,576
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.
['words = stdin.readline().rstrip().split()\ncards = [int(x) for x in stdin.readline().rstrip().split()]\ndrop = stdin.readline().rstrip()\n\nif drop == words[0]:\n cards[0] -= 1\n print(cards[0] + " " + cards[1])\nelif drop == words[1]:\n cards[1] -= 1\n print(cards[0] + " " + cards[1])', 'words = stdin.readline().rstrip().split()\ncards = [int(x) for x in stdin.readline().rstrip().split()]\ndrop = stdin.readline().rstrip()\n\nif drop == words[0]:\n cards[0] -= 1\n print(str(cards[0]) + " " + str(cards[1]))\nelif drop == words[1]:\n cards[1] -= 1\n print(str(cards[0]) + " " + str(cards[1]))', 'words = input().split()\ncards = [int(x) for x in input().split()]\ndrop = input()\n\nif drop == words[0]:\n cards[0] -= 1\n print(str(cards[0]) + " " + str(cards[1]))\nelif drop == words[1]:\n cards[1] -= 1\n print(str(cards[0]) + " " + str(cards[1]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s165429740', 's331104569', 's685036458']
[3060.0, 3060.0, 3060.0]
[17.0, 19.0, 17.0]
[292, 312, 258]
p02777
u556477263
2,000
1,048,576
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.
['s, t = map(input().split())\n\na, b = map(int(input().split()))\n\nu = input()\n\nif s == u:\n print(a - 1, b)\nelif t == u:\n print(a, b - 1)\n', 's, t = input().split()\n\na, b = map(int,input().split())\n\nu = input()\n\nif s == u:\n print(a - 1, b)\nelif t == u:\n print(a, b - 1)\n']
['Runtime Error', 'Accepted']
['s053537362', 's333951303']
[9020.0, 9156.0]
[21.0, 28.0]
[140, 134]
p02777
u556610039
2,000
1,048,576
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.
["s, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif s == u: print(str(a - 1) + ' ' + str(b))\nif t == u: print(str(a) + ' ' + str(b - 1))\nelse:print(str(a) + ' ' + str(b))", "s, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif s == u: print(str(a - 1) + ' ' + str(b))\nif t == u: print(str(a) + ' ' + str(b - 1))"]
['Wrong Answer', 'Accepted']
['s646536574', 's305720177']
[3060.0, 2940.0]
[18.0, 17.0]
[199, 165]
p02777
u557565572
2,000
1,048,576
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.
['# import math\n\n# import heapq\n# from collections import deque\n# import numpy as np\n\n# a,b,c = map(int, input().split())\n# n = int(input())\n# a = list(map(int,input().split()))\ns,t = input().split()\na,b = map(int, input().split())\nu = int(input())\nif u == s: print(a-1,b)\nelse: print(a,b-1)\n\n\n', '# import math\n\n# import heapq\n# from collections import deque\n# import numpy as np\n\n# a,b,c = map(int, input().split())\n# n = int(input())\n# a = list(map(int,input().split()))\ns,t = input().split()\na,b = map(int, input().split())\nu = int(input())\nif u == s: print(a-1,b)\nelse: print(a,b-1)\nprint(ans)\n\n', '# import math\n\n# import heapq\n# from collections import deque\n# import numpy as np\n\n# a,b,c = map(int, input().split())\n# n = int(input())\n# a = list(map(int,input().split()))\ns,t = input().split()\na,b = map(int, input().split())\nu = input()\nif u == s: print(a-1,b)\nelse: print(a,b-1)\n\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s304262173', 's810964238', 's797924124']
[2940.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0]
[307, 317, 302]
p02777
u559891647
2,000
1,048,576
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.
['st input().split()\nkazu = list(map(int, input().split()))\nu = input()\na = {st[0]: kazu[0], st[1]: kazu[1]}\na[u] -= 1\nprint(a[0], a[1])', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif s == u:\n print(a - 1, b)\nelse:\n print(a, b - 1)']
['Runtime Error', 'Accepted']
['s133650472', 's163190344']
[2940.0, 2940.0]
[17.0, 17.0]
[134, 120]
p02777
u566297428
2,000
1,048,576
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.
['S,T = int().split()\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n A = A - 1\nelse:\n B = B - 1\nprint(A,B)\n\n', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n A = A - 1\nelse:\n B = B - 1\nprint(A,B)\n\n']
['Runtime Error', 'Accepted']
['s417112198', 's922150994']
[2940.0, 2940.0]
[17.0, 18.0]
[117, 119]
p02777
u566428756
2,000
1,048,576
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.
["S,T=input().split()\nA,B=map(int,input().split())\nU=input()\ndic={S:A,T:B}\ndic[U]-=1\nfor v in dic.values():\n print(v,end=' ')\n\n", 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nDic={S:A,T:B}\nDic[U]-=1\nprint(Dic[S],Dic[T])']
['Wrong Answer', 'Accepted']
['s069598132', 's629753132']
[2940.0, 3060.0]
[18.0, 17.0]
[128, 103]
p02777
u567664824
2,000
1,048,576
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.
['S,T = input("Enter the color").split()\nA,B = int(input("Enter two value: ").split()) \nU = input("Color you want")\nif U==S:\n A=A-1\n print(A)\nelse:\n B=B-1\n print(B)', 'S,T = input("Enter the color").split()\nA,B = input("Enter the number").split()\nU = input("Color you want")\nif U==S:\n print(A-=1)\nelse:\n print(B-=1)', 'S,T = input("Enter the color").split()\nA,B = int(input("Enter the number").split())\nU = int(input("Color you want"))\nif U==S:\n print(A-=1)\nelse:\n print(B-=1)', 'S,T = input().split(" ")\nA,B = map(int,input().split(" "))\nU = input()\nif S==U:\n A-=1\nelse:\n B-=1\nprint("{} {}".format(A,B))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s052167994', 's431983488', 's725657960', 's994531730']
[2940.0, 2940.0, 2940.0, 2940.0]
[20.0, 17.0, 17.0, 17.0]
[166, 149, 159, 126]
p02777
u570944601
2,000
1,048,576
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.
['(s,t),(a,b),u=input().split(),map(int,input().split()),input();print(a-(s==u),b-(t--u))', '(s,t),(a,b),u=input().split(),map(int,input().split()),input();print(a-(s==u),b-(t==u))']
['Runtime Error', 'Accepted']
['s769856464', 's870749070']
[2940.0, 2940.0]
[19.0, 17.0]
[87, 87]
p02777
u571075527
2,000
1,048,576
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.
['red,blue=input().split()\na,b=(int(x) for x in input().split())\ndic={red:a,blue:b}\nu=input()\ndic[u]-=1\nprint(dic[a]+" "+dic[b])\n\n', 'red,blue=input().split()\na,b=(int(x) for x in input().split())\ndic={red:a,blue:b}\nu=input()\ndic[u]-=1\nprint(str(dic[red])+" "+str(dic[blue]))']
['Runtime Error', 'Accepted']
['s196943637', 's255035958']
[2940.0, 2940.0]
[17.0, 17.0]
[128, 141]
p02777
u571444155
2,000
1,048,576
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.
['n, k = map(int, input().split())\n \np = list(map(int, input().split()))\n \np = [(e+1) / 2 for e in p]\n \ns = sum(p[0:k])\ns_max = s\n \nfor i in range(n-k):\n s = s - p[i] + p[i+k]\n if s_max < s:\n s_max = s\n \nprint(s_max)', 's, t = map(str, input().split())\n\na, b = map(int, input().split())\n\nu = input()\n\nif u == t:\n b = b -1\nelse:\n a = a -1\n \nprint(a,b)']
['Runtime Error', 'Accepted']
['s599908408', 's251440500']
[3064.0, 2940.0]
[18.0, 17.0]
[222, 133]
p02777
u572425901
2,000
1,048,576
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.
['import sys\n[N, T] = list(map(str, input().split()))\n[A, B] = list(map(int, input().split()))\nU = input()\nprint(N, T, A, B, U)\nif (N == U):\n A -= 1\nelse:\n B -= 1\nprint("{} {}".format(A, B))\nsys.stdout.flush', '[N, T] = list(map(str, input().split()))\n[A, B] = list(map(int, input().split()))\nU = input()\nprint(N, T, A, B, U)\nif (N == U):\n A -= 1\nelse:\n B -= 1\nprint("{} {}".format(A, B))', 'import sys\n[N, T] = list(map(str, input().split()))\n[A, B] = list(map(int, input().split()))\nU = input()\nif (N == U):\n A -= 1\nelse:\n B -= 1\nprint("{} {}".format(A, B))\nsys.stdout.flush']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s416882992', 's754391073', 's533795036']
[3064.0, 3064.0, 3060.0]
[17.0, 18.0, 19.0]
[211, 183, 190]
p02777
u573900545
2,000
1,048,576
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.
['S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\nif U == S:\n print(A - 1)\nelse:\n print(B - 1)', 'S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\nif U == S:\n print(A - 1, B)\nelse:\n print(A, B - 1)']
['Wrong Answer', 'Accepted']
['s502337684', 's217484478']
[9020.0, 8928.0]
[29.0, 30.0]
[133, 139]
p02777
u574779290
2,000
1,048,576
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.
['N = int(input())\nA = list(map(int, input().split()))\n\nflag = True\nA = sorted(A)\nfor i in range(N-1):\n if A[i] == A[i+1]:\n flag = False\n break\nif flag:\n print("YES")\nelse:\n print("NO")', 'S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == U:\n print(A-1, B)\nelse:\n print(A, B-1)']
['Runtime Error', 'Accepted']
['s617306003', 's972115623']
[9056.0, 9060.0]
[23.0, 25.0]
[192, 132]
p02777
u586662847
2,000
1,048,576
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.
["import sys\n\n\ndef resolve():\n input = sys.stdin.readline\n\n S, T = map(str, input().split())\n A, B = map(int, input().split())\n U = input()\n\n if S == U:\n A -= 1\n print(str(A) + ' ' + str(B))\n return\n B -= 1\n print(str(A) + ' ' + str(B))\n\n\nresolve()", "import sys\n\n\ndef resolve():\n input = sys.stdin.readline\n\n S, T = map(str, input().split())\n A, B = map(int, input().split())\n U = input()\n\n if S == U:\n A -= 1\n print(str(A) + ' ' + str(B))\n return\n B -= 1\n print(str(A) + ' ' + str(B))\n\n\nresolve()\n", "import sys\n\n\ninput = sys.stdin.readline\n\ndef resolve():\n S, T = map(str, input().split())\n A, B = map(int, input().split())\n U = input()\n\n if S == U:\n A -= 1\n print(str(A) + ' ' + str(B))\n return\n B -= 1\n print(str(A) + ' ' + str(B))\n\n\nresolve()\n", "import sys\n# import itertools\n# import math\n\ninput = sys.stdin.readline().rstrip()\n\n\ndef resolve():\n S, T = map(str, input().split())\n A, B = map(int, input().split())\n U = input()\n\n if S == U:\n A -= 1\n print(str(A) + ' ' + str(B))\n return\n B -= 1\n print(str(A) + ' ' + str(B))\n\n\nresolve()\n", "import sys\n\n\ndef resolve():\n S, T = map(str, input().split())\n A, B = map(int, input().split())\n U = input()\n\n if S == U:\n A -= 1\n print(str(A) + ' ' + str(B))\n return\n B -= 1\n print(str(A) + ' ' + str(B))\n\n\nresolve()\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s171933410', 's190929953', 's284772924', 's621408804', 's929442304']
[3060.0, 3060.0, 3060.0, 3184.0, 3060.0]
[18.0, 17.0, 17.0, 17.0, 17.0]
[288, 289, 285, 329, 257]
p02777
u592035627
2,000
1,048,576
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.
['S,T = input().split()\na,b = list(map(int,input().split()))\nu = input()\n\nif S = u:\n print(a-1,b)\nelse:\n print(a,b-1)', 'S,T = input().split()\na,b = list(map(int,input().split()))\nu = input()\n \nif S == u:\n print(a-1,b)\nelse:\n print(a,b-1)']
['Runtime Error', 'Accepted']
['s465930131', 's633965522']
[2940.0, 2940.0]
[17.0, 17.0]
[121, 123]
p02777
u594862874
2,000
1,048,576
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.
["S, T = input().split()\nA , B = input().split()\n\nif S == 'blue' or S=='red':\n\tprint(A-1)\nelse:\n print(B-1)", "S, T = input().split()\nA , B = input().split()\n\nif S == 'blue' or S=='red':\n\tprint(A-1)\nelse:\n\tprint(B-1)", 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S: A -= 1\nelse: B -= 1\nprint(A, B)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s838356234', 's961799602', 's335311189']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[106, 105, 113]
p02777
u595952233
2,000
1,048,576
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.
[' a, b = input().split()\n an, bn = map(int, input().split())\n s = input()\n\n d = {a: an, b:bn}\n d[s] -= 1\n\n print("{} {}".format(d[a], d[b]))', 'a, b = input().split()\nan, bn = map(int, input().split())\ns = input()\n\nd = {a: an, b:bn}\nd[s] -= 1\n\nprint("{} {}".format(d[a], d[b]))']
['Runtime Error', 'Accepted']
['s540835539', 's043247117']
[2940.0, 2940.0]
[17.0, 17.0]
[157, 133]
p02777
u597443755
2,000
1,048,576
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.
["def main():\n\tn=int(input())\n\ta=list(map(int, input().split()))\n\tcount = 0\n\twhile count==0:\n\t\tfor i in range(n):\n\t\t\tif a.count(a[i])> 1:\n\t\t\t\tcount+=1\n\t\t\t\tprint('NO')\n\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tcontinue\n\tif count==0:\n\t\tprint('YES')\nmain()", 'def main():\n\ts,t = map(str,input().split())\n\ta, b = map(int, input().split())\n\tu= input()\n\tif u==s:\n\t\tprint(str(a-1),str(b))\n\telse:\n\t\tprint(str(a),str(b-1))\nmain()\n']
['Runtime Error', 'Accepted']
['s532756492', 's708039059']
[3060.0, 2940.0]
[17.0, 17.0]
[233, 164]
p02777
u597455618
2,000
1,048,576
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.
['s t = map(str, input().split())\na b = map(int, input().split())\nu = input()\nif s == u:\n print(a-1, b)\nelse:\n print(a, b-1)', 's, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif s == u:\n print(a-1, b)\nelse:\n print(a, b-1)']
['Runtime Error', 'Accepted']
['s866473460', 's141609559']
[2940.0, 2940.0]
[17.0, 17.0]
[128, 130]
p02777
u600261652
2,000
1,048,576
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.
['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nprint(A-1, B if s==T else A, B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nprint((A-1, B) if S==U else (A, B-1))\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nprint(A-1, B if S==U else A, B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nprint(A-1, B) if S==U else print(A, B-1)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s111904362', 's342626759', 's721092868', 's960665579']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0, 18.0]
[101, 106, 101, 108]
p02777
u602773379
2,000
1,048,576
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.
['s,t=map(str,input().split())\na,b=map(int,input().split())\nu=str(input())\n\nif s==u:\n\ta-=1\nelse:\n\tb-=1', 's,t=map(str,input().split())\na,b=map(int,input().split())\nu=str(input())\n\nif s==u:\n\ta-=1\nelse:\n\tb-=1\nprint("{} {}".format(a,b))']
['Wrong Answer', 'Accepted']
['s996207659', 's278323208']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 127]
p02777
u604231488
2,000
1,048,576
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.
['#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\n#ifdef tabr\n#include "library/debug.cpp"\n#else\n\n#endif\n\nint main() {\n ios::sync_with_stdio(false);\n cin.tie(0);\n int n, a, b;\n cin >> n >> a >> b;\n int m = 1 << n;\n int d = a ^ b;\n if (__buitin_popcount(d) % 2 == 1) {\n cout << "NO" << endl;\n return 0;\n }\n cout << "YES" << endl;\n vector<int> res(m);\n\n for (int i = 0; i < m; i++) {\n cout << res[i] ^ a << " ";\n }\n cout << endl;\n return 0;\n}', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif s == u:\n a -= 1\nelse:\n b -= 1\nprint(a, b)\n']
['Runtime Error', 'Accepted']
['s785574487', 's785334660']
[2940.0, 3064.0]
[17.0, 17.0]
[539, 120]
p02777
u606324534
2,000
1,048,576
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.
["s = input().split()\nn = input().split()\ns2 = input()\n\nif s[0] == s2:\n n[0] = n[0] - 1\nelse:\n n[1] = n[1] - 1\n\nprint(str(n[0]) +' '+str(n[1]))\n", "# -*- coding: utf-8 -*-\ns = input().split()\nn = input().split()\ns2 = input()\n \nif s[0] == s2:\n n[0] = n[0] - 1\nelse:\n n[1] = n[1] - 1\n \nprint(str(n[0]) +' '+str(n[1]))\n", "# -*- coding: utf-8 -*-\ns = input().split()\nn = list(map(int,input().split()))\ns2 = input()\n\nif s[0] == s2:\n n[0] = n[0] - 1\nelse:\n n[1] = n[1] - 1\n\nprint(str(n[0]) +' '+str(n[1]))\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s569113875', 's750292130', 's767726641']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[144, 170, 183]
p02777
u607729897
2,000
1,048,576
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.
["import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\n\ndef main():\n N, *A = read().split()\n for a in A:\n if A.count(a)==1:\n continue\n else:\n result = 'NO'\n return result\n else:\n result = 'Yes'\n return result\n\nif __name__ == '__main__':\n print(main())\n\n", "from itertools import accumulate\nimport sys\n\ndef main():\n read = sys.stdin.buffer.read\n N, K, *p = map(int, read().split())\n p = [0] + list(accumulate(p))\n print((max(y - x for x, y in zip(p, p[K:])) + K) / 2)\n\nif __name__ == '__main__':\n main()\n", "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\n\ndef main():\n S,T=input().split()\n A,B=map(int,input().split())\n U=input()\n if S==U:\n A-=1\n else:\n B-=1\n print(A,B)\n\n\n return \n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s639952900', 's918648130', 's444119526']
[2940.0, 3060.0, 2940.0]
[18.0, 17.0, 18.0]
[344, 253, 278]
p02777
u608088992
2,000
1,048,576
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.
['s, t = map(str, input().split())\na, b = map(int, input().split())\nn = input()\nif n == a: print(a-1, b)\nelse: print(a, b-1)', 's, t = map(str, input().split())\na, b = map(int, input().split())\nn = input()\nif n == s: print(a-1, b)\nelse: print(a, b-1)']
['Wrong Answer', 'Accepted']
['s485482020', 's381738759']
[2940.0, 2940.0]
[43.0, 17.0]
[122, 122]
p02777
u609814378
2,000
1,048,576
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.
['S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = input()\n\nif U == "blue":\n print(str(A) + "" +str(int(B-1)))\nelse:\n print(str(int(A-1)) + "" +str(int(B)))', 'import sys\nA = list(map(int, input().split()))\nN = int(input())\n\nif len(A) == len(set(A)):\n print("YES")\nelse:\n print("NO")\n', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\n \nif u == s:\n print(a - 1, b)\nelse:\n print(a, b- 1)\n \n\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s177944245', 's921593898', 's475720119']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[181, 130, 129]
p02777
u610326327
2,000
1,048,576
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.
["s, t = input().split(' ')\na, b = map(int, input().split(' '))\nu = input()\n\nif u == s:\n print(a - 1)\nelif u == t:\n print(b - 1)\n", "s, t = input().split(' ')\na, b = map(int, input().split(' '))\nu = input()\n\nif u == s:\n print(a - 1, b)\nelif u == t:\n print(a, b - 1)\n"]
['Wrong Answer', 'Accepted']
['s638085811', 's008228613']
[2940.0, 2940.0]
[17.0, 17.0]
[133, 139]
p02777
u610856690
2,000
1,048,576
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.
['s, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n print(str(a)-1+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))\n', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n print(str(a-1)+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))\n\n ']
['Runtime Error', 'Accepted']
['s065572300', 's440987457']
[2940.0, 2940.0]
[17.0, 19.0]
[147, 152]
p02777
u611090896
2,000
1,048,576
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.
['S,T = input().split()\nA,B = map(int,input().split())\nU = input()\nprint((A-1,B) if S == U else print (A,B-1))', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\nprint((A-1),B if S == U else A,(B-1))', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\nprint((A-1,B) if S == U else (A,B-1))\n', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\nprint(A-1,B) if S == U else print(A,B-1)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s357608591', 's457284023', 's536133143', 's016040275']
[2940.0, 2940.0, 2940.0, 2940.0]
[19.0, 17.0, 22.0, 17.0]
[108, 102, 103, 106]
p02777
u612975321
2,000
1,048,576
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.
['import sys\ninput = sys.stdin.buffer.readline\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\n\ns, t = input().split()\na, b = MAP()\nu = input()\n\nif u == s:\n a -= 1\nif u == t:\n b -= 1\nprint(a, b)', "import sys\ninput = sys.stdin.buffer.readline\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\n\ns, t = input().split()\nab = LIST()\nu = input()\n\nif u == s:\n ab[0] -= 1\nif u == t:\n ab[1] -= 1\n \nab = [str(i) for i in ab]\nprint(' '.join(ab))\n", "import sys\ninput = sys.stdin.buffer.readline\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\n\ns, t = input().split()\nab = LIST()\nu = input()\n\nif u == s:\n ab[0] -= 1\nif u == t:\n ab[1] -= 1\n \nab = [str(i) for i in ab]\nprint(' '.join(ab))\n", 's, t = input().split()\na, b = map(int,input().split())\nu = input()\n\nif u == s:\n a -= 1\nif u == t:\n b -= 1\nprint(a, b)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s263141619', 's505946012', 's759493818', 's486647255']
[9184.0, 8956.0, 9204.0, 9120.0]
[29.0, 28.0, 28.0, 30.0]
[245, 292, 292, 123]
p02777
u614628638
2,000
1,048,576
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.
['import numpy as np\n \nfirst_int = [int(k) for k in input().split()]\na = first_int[0]\nb = first_int[1]\nsecound_list = [int(k) for k in input().split()]\n \nall_sigm = [k for k in secound_list]\nmax_index = all_sigm.index(max(all_sigm))\nprint(sum(all_sigm[max_index:max_index+b]))', 'import numpy as np\n \nfirst_int = [int(k) for k in input().split()]\na = first_int[0]\nb = first_int[1]\nsecound_list = [int(k) for k in input().split()]\n \ndef sigm(k):\n return k*(k+1)/2\n \nall_sigm = [sigm(k) for k in secound_list]\nall_sigm_ = [sum(all_sigm[k:k+b]) for k in range(a)]\nprint(max(all_sigm_))', "a = input().split()\nb = [int(k) for k in input().split()]\nc = input()\n\nif a[0] == c:\n b[0] -= 1\nelse:\n b[1] -= 1\n\nprint('{0} {1}'.format(b[0],b[1]))"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s495765088', 's734079855', 's585104307']
[20736.0, 17616.0, 3060.0]
[310.0, 252.0, 17.0]
[274, 303, 150]
p02777
u617037231
2,000
1,048,576
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.
["S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif S == U:\n print(str(A-1) + '' + str(B))\nelse:\n print(str(A) + '' + str(B-1))", "S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif S == U:\n print(str(A-1) + ' ' + str(B))\nelse:\n print(str(A) + ' ' + str(B-1))\n"]
['Wrong Answer', 'Accepted']
['s802757096', 's704294425']
[2940.0, 2940.0]
[17.0, 17.0]
[154, 157]
p02777
u619850971
2,000
1,048,576
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.
['s,t=input().split() \na,b= map(int,input().split())\nu=input()\n\nif s==u:\n a -=1\nelse:\n b -=1\nprint(str(a)+" "+str(b)', 's,t=input().split() \na,b= map(int,input().split())\nu=input()\n\nif s==u:\n a =a-1\nelse:\n b =b-1\nprint(str(a)+" "+str(b))']
['Runtime Error', 'Accepted']
['s437117786', 's468730012']
[2940.0, 3060.0]
[17.0, 18.0]
[121, 124]
p02777
u620549327
2,000
1,048,576
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.
['S,T = map(input().split())\nA,B = map(int,input().split())\nU = input()\n\nif U==S:\n print (A-1,B);\nelse:\n print (A,B-1);\n ', 'S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n \nif U==S:\n print (A-1,B);\nelse:\n print (A,B-1);\n']
['Runtime Error', 'Accepted']
['s007664196', 's306918547']
[2940.0, 2940.0]
[17.0, 17.0]
[122, 116]