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
p02696
u932868243
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n=map(int,input().split())\nif b==0:\n print(0)\nelse:\n print(int(a*(b-1)/b)-a*int((b-1)/b))', 'a,b,n=map(int(input().split())\nif b-1<=n:\n x=b-1\n print(int(a*x/b)-a*int(x/b))\nelse:\n x=n\n print(int(a*x/b)-a*int(x/b))\n\n \n ', 'a,b,n=map(int,input().split())\nprint(int(a*(b-1)/b)-a*i...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s082733786', 's416790287', 's720624131', 's804143059', 's751469014']
[9156.0, 9020.0, 9128.0, 9100.0, 9108.0]
[23.0, 25.0, 23.0, 20.0, 21.0]
[95, 146, 67, 95, 136]
p02696
u935642171
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
["a,b,n = map(int, input().split())\nans = 0\n\nyuka = lambda a,b: (a-(a%b))//b\n\nc = yuka(a,b)\n'''\nfor x in range(b):\n score = (x%b)*c\n ans = max(ans,score)\n'''\nans = (b-1)*c\nprint(ans)", 'a,b,n = map(int, input().split())\nyuka = lambda a,b: (a-(a%b))//b\n\nx = min(n,b-1)\nscore = yuka(a*(x%b),b)\nans = sco...
['Wrong Answer', 'Accepted']
['s992686526', 's043557076']
[9108.0, 9112.0]
[24.0, 24.0]
[182, 129]
p02696
u937642029
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import sys, bisect, math, itertools, string, queue, copy\n# import numpy as np\n\nfrom collections import Counter,defaultdict,deque\nfrom itertools import permutations, combinations\nfrom heapq import heappop, heappush\nfrom fractions import gcd\n# input = sys.stdin.readline\nsys.setrecursionlimit(10**8)\nmod = 10**9...
['Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted']
['s382560916', 's467110449', 's660974840', 's846393840']
[10832.0, 10716.0, 10856.0, 9068.0]
[33.0, 2206.0, 438.0, 20.0]
[930, 994, 999, 144]
p02696
u938350027
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math\nA, B, N = map(int,input().split(\' \'))\n\ndef f(x):\n print(math.floor(A*x/B), A*math.floor(x/B))\n return math.floor(A*x/B)-A*math.floor(x/B)\n\n\ndef main():\n \n ans = 0\n i = 0\n while B > i and i <= N:\n fi = f(i)\n ans = f(i) if ans < fi else ans\n i += 1 \n ...
['Wrong Answer', 'Accepted']
['s533083495', 's279312864']
[10900.0, 9072.0]
[2217.0, 20.0]
[359, 228]
p02696
u940780117
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math\nA,B,N=map(float,input().split())\nif N = B:\n N = N-1\nans = math.floor((A*N/B)) - A*math.floor(N/B)\nprint(int(ans))', 'A,B,N=map(int,input().split())\nif B==1 or A==1:\n ans = 0\nelif A==10**6 and B ==10**12\n ans = 10**6\nelse:\n while N%B==0:\n N = N-1\n ans = (A*N)//B - A*(N//B...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s637462976', 's710186743', 's868047670', 's111115907']
[8940.0, 8956.0, 9004.0, 9060.0]
[19.0, 24.0, 22.0, 23.0]
[128, 185, 142, 121]
p02696
u941022948
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,c=map(int,input().split())\nif c+1>=b:\n ans=int(a*(b-1)/b)\nelse:\n ans=(a*c/b)\nprint(ans)', 'a,b,c=map(int,input().split())\nif c+1>=b:\n ans=int(a*(b-1)/b)\nelse:\n ans=int(a*c/b)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s922146621', 's385754834']
[9168.0, 8980.0]
[23.0, 22.0]
[97, 100]
p02696
u944325914
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n=map(int,input().split())\nimport math\nif b==1:\n print(0)\nelse:\n print(math.floor(a*(b-1)/b))', 'a,b,n=map(int,input().split())\nimport math\nprint(math.floor(a*(b-1)/b))', 'a,b,n=map(int,input().split())\nimport math\nprint(math.floor(a*(min(n,(b-1)))/b))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s134642727', 's678702791', 's071361757']
[9108.0, 9040.0, 9068.0]
[26.0, 26.0, 30.0]
[99, 71, 80]
p02696
u947047288
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math \nA, B, N = map(int, input().split())\n\n# A, B, N = 11, 10, 9\n\nmaxR = -1\nmaxX = 0\nfor x in range(0, N+1):\n R = math.floor(A*x/B) - A * math.floor(x/B)\n if R >= maxR:\n maxR = R\n maxX = x\nprint (maxX)', 'import math ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s294451783', 's409238687', 's901809464', 's685974266']
[9188.0, 9184.0, 9140.0, 9088.0]
[2205.0, 2205.0, 2205.0, 21.0]
[282, 281, 282, 385]
p02696
u948521599
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['A,B,N = map(int,input().split())\nmaxn =0\nif A<B:\n if B/2 <N:\n t = math.ceil(B/2)-1\n ans = tmp = math.floor((A*t)/B)-A*(math.floor(t/B))\n else:\n ans = tmp = math.floor((A*N)/B)-A*(math.floor(N/B))\nelse:\n for x in range(1,B+1):\n tmp = math.floor((A*x)/B)-A*(math.floor(x/B)...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s250451109', 's432195271', 's063269233']
[9144.0, 9228.0, 9164.0]
[19.0, 27.0, 22.0]
[380, 301, 106]
p02696
u952669998
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['A,B,N = list(map(int,input().split()))\n\ndef f(n):\n d = int(A*n/B) - A*int(n/B)\n return d\n\nif N < B==0:\n ans = int(A*N/B)\nelse:\n ans = A-1', 'A,B,N = list(map(int,input().split()))\n\ndef f(n):\n d = int(A*n/B) - A*int(n/B)\n return d\n\nprint(f(min(B-1,N)))\n']
['Wrong Answer', 'Accepted']
['s977759373', 's634325018']
[9172.0, 9136.0]
[23.0, 20.0]
[149, 117]
p02696
u952968889
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math\na, b, n = map(int, input().split())\nif b>n:\n print(math.floor(a*n/b))\nelse:\n \tx = b-1\n print(math.floor(a*x/b))', 'import math\na, b, n = map(int, input().split())\nif b>n:\n print(math.floor(a*n/b))\nelse:\n x = b-1\n print(math.floor(a*x/b))']
['Runtime Error', 'Accepted']
['s800140376', 's432837071']
[9028.0, 9112.0]
[21.0, 23.0]
[130, 131]
p02696
u953379577
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a , b , n = map(int,input().split())\nx = n - 1\nprint(int((a*x)/b)-a*(x/b))', 'a , b , n = map(int,input().split())\nx = b - 1\n\ndef fnc(x):\n return int((a*x)/b)-a*int((x/b))\n\nans = []\n\nfor i in range(x):\n ans.append(fnc(i))\n\nprint(max(ans))', 'a,b,n = map(int,input().split())\nx = min(b-1,n)\nprint(i...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s452846390', 's706503790', 's149223229']
[9020.0, 50280.0, 8992.0]
[22.0, 2207.0, 25.0]
[74, 166, 76]
p02696
u955474478
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a, b, n = map(int, input().split())\nans1 = 0\nfor i in range(n+1):\n ans2 = int(a * i / b) - a * int(i / b)\n ans1 = max(ans1, ans2)\n if ans1 == ans2:\n x = i\nprint(x)', 'a, b, n = map(int, input().split())\nif b > n:\n x = n\nelse:\n x = b - 1\nprint(int(a * x / b) - a * int(x / b))']
['Wrong Answer', 'Accepted']
['s964040635', 's150091794']
[9084.0, 9168.0]
[2206.0, 22.0]
[169, 110]
p02696
u957198490
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['A,B,X = map(int,input().split())\nprint(min(B-1,N))', 'A,B,N = map(int,input().split())\nx = min(B-1,N)\nans = int(A*x/B) - A*int(x/B)\nprint(ans)']
['Runtime Error', 'Accepted']
['s995755901', 's886066994']
[9056.0, 9168.0]
[20.0, 20.0]
[50, 88]
p02696
u961945062
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math\nA, B, N = map(int, input().split())\n\nd = 0\nans = 0\nfor i in range(1, N+1):\n d = math.floor((A*i)/B) - A*math.floor(i/B)\n if ans <= d:\n ans = d\n else:\n print(ans)\n exit()\n', 'import math\n\nA, B, N = map(int, input().split())\nprint(math.floor((A * min(B-1, N)) / B...
['Wrong Answer', 'Accepted']
['s492008238', 's621993831']
[9112.0, 9108.0]
[2205.0, 25.0]
[212, 123]
p02696
u969211566
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n = map(int,input().split())\ni = max(b-1,n)\nans = a*i//b - a*(i//b)\nprint(ans)', 'a,b,n = map(int,input().split())\nans = 0\n\nif a <= n:\n print(a-1)\nelse:\n for i in range(n+1,n-a,-1):\n ans = max(ans,(a*i)//b - a*(i//b))\n print(ans)', 'a,b,n = map(int,input().split())\nans = 0\n \nfor i in...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s082639839', 's139161861', 's223749601', 's264855886', 's505684510', 's556380317', 's787453119', 's799474735', 's806905728', 's406858259']
[8912.0, 9028.0, 9176.0, 9176.0, 9180.0, 9024.0, 9052.0, 9088.0, 9176.0, 9120.0]
[20.0, 34.0, 1903.0, 494.0, 2205.0, 21.0, 1090.0, 1819.0, 1027.0, 22.0]
[82, 163, 124, 122, 125, 123, 151, 184, 124, 82]
p02696
u970133396
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['n, m, q = map(int, input().strip().split())\nL = [list(map(int, input().split())) for _ in range(q)]\n\npossibleA=[[i]*n for i in range(1,m+1)]\nfor i in range(n):\n for j in range(i+1,m+1):\n \n\nimport math\na, b, n = map(int, input().strip().split())\nif b<n:\n x=n\nelif n % b <= n%(b/a):\n x=n-n%b...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s059772442', 's157761550', 's836092599', 's901327737', 's095418106']
[8784.0, 9128.0, 9196.0, 9184.0, 9164.0]
[20.0, 24.0, 20.0, 20.0, 22.0]
[411, 221, 203, 235, 111]
p02696
u970308980
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['\nsi = lambda: input().strip()\nii = lambda: int(input())\nmii = lambda: map(int, input().split())\nmsi = lambda: map(str, input().split())\nlmii = lambda: list(map(int, input().split()))\nlmsi = lambda: list(map(str, input().split()))\nsmii = lambda: sorted(map(int, input().split()))\n\n# ----------\n\nA, B, N = mii...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s015541580', 's383782399', 's804870939', 's548684013']
[9212.0, 9192.0, 9212.0, 9220.0]
[19.0, 23.0, 19.0, 25.0]
[429, 412, 430, 441]
p02696
u971124021
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n = list(map(int, input().split()))\n\nans = 0\nT = 0\nfor i in range(1,n+1)[::-1]:\n t = (a*i)//b - a*(i//b)\n if T < t:\n T = t\n ans = i\n\nprint(ans)', 'a,b,n = list(map(int, input().split()))\nt = 0\nn = min(b-1,n)\n\nprint((a*n)//b - a*(n//b))']
['Wrong Answer', 'Accepted']
['s623408282', 's738517324']
[9040.0, 9064.0]
[2206.0, 28.0]
[155, 88]
p02696
u972658925
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n = map(int,input().split())\n\nans1 = (a*n)//b - a*(n//b)\nans2 = (a*(b-1))//b - a*((b-1)//b)\n\nprint(max(ans1,ans2))', 'a,b,n = map(int,input().split())\n\nif n < b-1:\n print(a*(n%b)//b)\nelse:\n print(a*((b-1)%b)//b)']
['Wrong Answer', 'Accepted']
['s627947790', 's829845449']
[9060.0, 9104.0]
[23.0, 23.0]
[118, 99]
p02696
u973900850
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n = map(int, input().split())\nif n < b:\n x = n\nelse:\n x = b-1\nwhile x >= 0:\n val = (a*x)//b-a*(x//b)\n if val < com:\n pass\n else:\n com = val\n x -= 1\nprint(com)', 'from math import floor\na,b,n = map(int, input().split())\nx = n\ncom = 0\nwhile x >= 0:\n val = floor((a...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s898642335', 's916506721', 's702376604']
[9164.0, 50252.0, 9140.0]
[21.0, 2256.0, 20.0]
[194, 241, 105]
p02696
u977490411
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a, b, n = map(int, input().split())\n\ntemp_prev = 0\ntemp_curr = 0\nx = b-1.0\nwhile x <= n:\n temp_prev = temp_curr\n temp_curr = int(a * x / b) - a * int(x / b)\n x += 1.0\n\n if temp_curr < temp_prev:\n break\n\nprint(max(temp_curr, temp_prev))', 'a, b, n = map(int, input().split())\n\ntemp_pre...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s411465251', 's719179015', 's230415974']
[9184.0, 9088.0, 9052.0]
[2205.0, 22.0, 19.0]
[254, 297, 262]
p02696
u980205854
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['\nA,B,N = map(int,input().split())\nx = max(B-1,N)\nprint(int(A*x/B))', '\nA,B,N = map(int,input().split())\nx = min(B-1,N)\nprint(int(A*x/B))']
['Wrong Answer', 'Accepted']
['s034944034', 's372210388']
[9052.0, 9144.0]
[25.0, 24.0]
[86, 86]
p02696
u983853152
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
["\ndef main():\n A, B, N = map(int, input().split())\n max = ((A*N)//B) - (A * (N//B))\n\n if B>=N:\n temp = ((A*(B-1))//B) - (A * ((B-1)//B))\n if max < temp:\n max = temp\n \n NN = N - A -1\n if NN < 0:\n NN = 0\n for index in (NN,N):\n temp = ((A*index)//B...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s070054281', 's175331527', 's747016724']
[9204.0, 9052.0, 9180.0]
[21.0, 22.0, 21.0]
[430, 430, 256]
p02696
u989345508
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a, b, n = map(int, input().split())\nif n >= b - 1:\n print(int(a - a / b))\nelse:\n print(a * n // b - a * n // b)', 'a,b,n=map(int,input().split());print(a*min(n,b-1)//b)']
['Wrong Answer', 'Accepted']
['s255028651', 's344187129']
[9160.0, 9088.0]
[20.0, 22.0]
[117, 53]
p02696
u991269553
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['import math\n\na,b,n = map(int,input().split())\n\nl = [0]\n\nfor x in reversed(range(0,n+1)):\n ans = 0\n ans = math.floor(a*x/b) - a * math.floor(x/b)\n l.append(ans)\n if max(l) > ans:\n break\nprint(l)\nprint(max(l))', 'import math\n\na,b,n = map(int,input().split())\n\nl = [0]\n\nfor x in rang...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s528337035', 's814467279', 's259422652']
[9644.0, 9192.0, 9156.0]
[2206.0, 22.0, 21.0]
[226, 205, 94]
p02696
u996665352
2,000
1,048,576
Given are integers A, B, and N. Find the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non- negative integer x not greater than N. Here floor(t) denotes the greatest integer not greater than the real number t.
['a,b,n=map(int,input().split())\nnmax = (a*n)//b - a*(n//b)\nx = b-1\nxmax = (a*x)//b - a*(x//b)\nprint(max(nmax,xmax))', 'a,b,n=map(int,input().split())\ns=n//b\nnmax = (a*n)//b - a*(n//b)\n\n# x = b*i-1\n# t = (a*x)//b - a*(x//b)\n# if t > nmax:\n# nmax = t\n# b_n = b\n\n# while b_n <= n:\n# ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s403930903', 's933171481', 's322848988']
[9180.0, 9180.0, 9052.0]
[19.0, 19.0, 19.0]
[114, 395, 133]
p02698
u014800961
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['n = int(input())\nalist = [0]+list(map(int,input().split()))\nuv_list = []\nfor i in range(n-1):\n u,v = map(int,input().split())\n if u > v:\n u,v = v,u\n uv_list.append([u,v])\n\ntree = [[] for _ in range(n+1)]\nfor i in range(n-1):\n uv = uv_list[i]\n tree[uv[0]].append(uv[1])\n\nqueue = [1]\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s329523057', 's624243946', 's932028734', 's911715284']
[70404.0, 70284.0, 70112.0, 97292.0]
[656.0, 683.0, 683.0, 1514.0]
[1151, 1152, 1196, 1285]
p02698
u044220565
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['# coding: utf-8\nimport sys\nsysread = sys.stdin.readline\nsys.setrecursionlimit(10**7)\ndef run():\n N = int(input())\n A = [0] + list(map(int, sysread().split()))\n to = [[] for _ in range(N+1)]\n for _ in range(N-1):\n u,v = map(int, sysread().split())\n to[u].append(v)\n to[v].app...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s154571457', 's656889712', 's513510889']
[96704.0, 259936.0, 294208.0]
[2208.0, 2214.0, 1696.0]
[1942, 1681, 1861]
p02698
u169138653
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from collections import deque\nfrom bisect import bisect_right\nfrom copy import deepcopy\nn=int(input())\na=list(map(int,input().split()))\nedge=[[] for _ in range(n)]\nfor _ in range(n-1):\n u,v=map(int,input().split())\n u-=1\n v-=1\n edge[u].append(v)\n edge[v].append(u)\nvisited=[True]*n\nlis=[[] ...
['Runtime Error', 'Accepted']
['s971178020', 's776351030']
[66824.0, 239396.0]
[824.0, 1452.0]
[872, 698]
p02698
u170201762
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from bisect import bisect\n\nN = int(input())\na = list(map(int,input().split()))\ng = [[] for _ in range(N)]\nfor i in range(N-1):\n u,v = map(int,input().split())\n u -= 1\n v -= 1\n g[u].append(v)\n g[v].append(u)\n\nans = [0]*N\ndef dfs(t,f,l,seq):\n l = l.copy()\n seq = seq.copy()\n l.app...
['Runtime Error', 'Accepted']
['s573706333', 's048543696']
[178136.0, 237592.0]
[2014.0, 1395.0]
[571, 684]
p02698
u179169725
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
["import sys\nsys.setrecursionlimit(1 << 25)\nread = sys.stdin.readline\nra = range\nenu = enumerate\n\n\ndef read_ints():\n return list(map(int, read().split()))\n\n\ndef read_a_int():\n return int(read())\n\n\ndef read_tuple(H):\n '''\n H is number of rows\n '''\n ret = []\n for _ in range(H):\n ...
['Runtime Error', 'Accepted']
['s148572581', 's969874574']
[53720.0, 232276.0]
[501.0, 974.0]
[5363, 1352]
p02698
u207097826
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from collections import deque\nimport bisect\n\n\nN = int(input())\na = list(map(int, input().split()))\nuvs = [list(map(int, input().split())) for _ in range(N-1)]\nshortest = [10e+10 for _ in range(N)]\nshortest[0] = 0\n\nroutes = [[] for _ in range(N)]\n\nfor uv in uvs:\n routes[uv[0]-1].append(uv[1]-1)\n ro...
['Runtime Error', 'Runtime Error', 'Accepted']
['s008922122', 's360244408', 's792591371']
[116404.0, 9484.0, 272200.0]
[1783.0, 24.0, 1662.0]
[1035, 947, 971]
p02698
u460375306
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['import sys\nsys.setrecursionlimit(1e6)\ndef dfs(vertex):\n visited[vertex] = True\n if vertex != 0:\n maxlen = 0\n x = a[vertex]\n for (L, z) in table:\n if z < x: # strict increasing\n maxlen = max(maxlen, L)\n table.append((maxlen+1, x))\n ans[vertex] = max(L for (L, _) in table)\n for n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s019476721', 's784362484', 's960650455']
[9000.0, 70432.0, 246744.0]
[22.0, 1019.0, 1553.0]
[730, 886, 773]
p02698
u559196406
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['n = int(input())\na = list(map(int,input().split()))\nt = [[] for _ in range(n+1)]\nfor _ in range(n-1):\n u,v = map(int,input().split())\n t[u].append(v)\n t[v].append(u)\n \nstack = [1]\ndp = [[] for _ in range(n+1)]\ndp[1] = [a[0]]\nans = [1]*(n+1)\nchecked = []\nwhile stack:\n b = stack.pop()\n ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s803281191', 's804265164', 's923479748', 's234250936']
[159908.0, 56936.0, 66264.0, 239384.0]
[2212.0, 1082.0, 866.0, 1371.0]
[960, 637, 855, 668]
p02698
u571969099
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['import sys\nsys.setrecursionlimit(1000000)\ndef input():\n return sys.stdin.readline()\nn = int(input())\na = [int(i) for i in input().split()]\ne = [[] for _ in range(n)]\nfor _ in range(n - 1):\n aa, bb = [int(i) - 1 for i in input().split()]\n e[aa].append(bb)\n e[bb].append(aa)\n\nans = [0] * n\nans[0...
['Wrong Answer', 'Accepted']
['s672156372', 's111818859']
[267412.0, 272480.0]
[1357.0, 1564.0]
[955, 793]
p02698
u600402037
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
["# coding: utf-8\nimport sys\nfrom bisect import bisect_left, bisect_right, insort\nsys.setrecursionlimit(10 ** 7)\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN = ir()\nA = [0] + lr() # 1-indexed\ngraph = [[] for _ in range(N+1)] # 1-indexed\nfo...
['Wrong Answer', 'Accepted']
['s177613831', 's615305885']
[1728432.0, 226364.0]
[2253.0, 1264.0]
[916, 870]
p02698
u608088992
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['import sys\nfrom bisect import bisect_left\nsys.setrecursionlimit(1000000)\nINF = pow(10, 10)\n\nchanged = []\ninput = sys.stdin.readline\nN = int(input())\nA = [int(a) for a in input().split()]\nEdge = [[] for _ in range(N)]\nfor _ in range(N-1):\n u, v = map(int, input().split())\n Edge[u-1].append(v-1)\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s087712954', 's540875112', 's952235664', 's313245605']
[155316.0, 237980.0, 97012.0, 237776.0]
[2345.0, 1137.0, 876.0, 1128.0]
[855, 858, 1022, 855]
p02698
u619144316
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from collections import defaultdict,deque\nimport bisect\n\nN = int(input())\nA = list(map(int,input().split()))\ngraph = defaultdict(deque)\nfor _ in range(0,N-1):\n u,v = map(int,input().split())\n graph[u].append(v)\n graph[v].append(u)\n\narrive = [False] * (N+1)\ndp_dict = [None] * N\ndp_dict[0] = [A[0]...
['Wrong Answer', 'Accepted']
['s674581833', 's706371239']
[176520.0, 271252.0]
[1275.0, 1100.0]
[914, 639]
p02698
u750990077
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from bisect import bisect_left, bisect, insort\n\ndef dfs(v, p):\n i = bisect_left(dp, a[v])\n dp[i], old = a[v], dp[i]\n ans[v] = i\n if p != -1:\n ans[v] = max(ans[v], ans[p])\n for u in to[v]:\n if u == p:\n continue\n dfs(u, v)\n\nif __name__ == "__main__":\n n = ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s198395633', 's387758304', 's966705805', 's673555347']
[68916.0, 224824.0, 224840.0, 224952.0]
[960.0, 1229.0, 1234.0, 1245.0]
[659, 649, 668, 671]
p02698
u836311327
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from collections import deque\nimport bisect\nimport sys\ndef input(): return sys.stdin.readline().rstrip()\n \ndef main():\n n = int(input())\n graph = [[] for _ in range(n+1)]\n \n A = [0]+list(map(int, input().split()))\n \n for i in range(n-1):\n a, b = map(int, input().split())\n graph[...
['Wrong Answer', 'Accepted']
['s353225049', 's032331065']
[64884.0, 76180.0]
[2207.0, 1071.0]
[1051, 889]
p02698
u906501980
2,000
1,048,576
We have a tree with N vertices, whose i-th edge connects Vertex u_i and Vertex v_i. Vertex i has an integer a_i written on it. For every integer k from 1 through N, solve the following problem: * We will make a sequence by lining up the integers written on the vertices along the shortest path from Vertex 1 to Vertex...
['from bisect import bisect_left\nimport sys\nsys.setrecursionlimit(1000000)\n\n\n\ndef dfs(p):\n ai = a[p]\n i = bisect_left(dp, ai)\n old = dp[i]\n dp[i] = ai\n ans[p] = bisect_left(dp, INF)-1\n for child in to[p]:\n if ans[child] is None:\n dfs(child)\n dp[i] = old\n \n \...
['Runtime Error', 'Accepted']
['s332363135', 's378824458']
[51904.0, 214624.0]
[617.0, 1277.0]
[708, 689]
p02699
u000037600
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a,b=map(int,input().split())\nif a=<b:\n print("unsafe")\nelse:\n print("safe")', 'a,b=map(int,input().split())\nif a<=b:\n print("unsafe")\nelse:\n print("safe")']
['Runtime Error', 'Accepted']
['s509731296', 's669491496']
[8944.0, 9132.0]
[25.0, 33.0]
[77, 77]
p02699
u001207097
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["a ,b = input().split()\n\nif a<b:\n\tprint('safe')\nelse:\n\tprint('unsafe')\n", "a ,b = input().split()\n\na=int(a)\nb=int(b)\nif a<b:\n\tprint('safe')\nelse:\n\tprint('unsafe')\n", "a , b , c , d = input().split()\n\na=int(a)\nb=int(b)\nc=int(c)\nd=int(d)\n\nwhile True:\n c -= b\n if c <= 0:\n print('Yes')\n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s092425914', 's338095404', 's783221170', 's777451871']
[9104.0, 9156.0, 9112.0, 9152.0]
[21.0, 23.0, 22.0, 22.0]
[70, 88, 180, 88]
p02699
u001769145
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['# A\n# Sheep and Wolves\n\ns w = map(int, input().split())\n\nif s <= w:\n print("unsafe")\nelse:\n print("safe")', '# A\n# Sheep and Wolves\n\ns, w = map(int, input().split())\n\nif s <= w:\n print("unsafe")\nelse:\n print("safe")']
['Runtime Error', 'Accepted']
['s989889862', 's746799030']
[8896.0, 9188.0]
[22.0, 20.0]
[111, 112]
p02699
u002611201
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['lists = list(map(int, input().split())) \nif lists[0] <= lists[1]:\n print("unsate")\nelse:\n print(\'safe\')', 'lists = list(map(int, input().split())) \nif lists[0] <= lists[1]:\n print("unsafe")\nelse:\n print(\'safe\')']
['Wrong Answer', 'Accepted']
['s152853328', 's738555494']
[9160.0, 9096.0]
[24.0, 23.0]
[209, 209]
p02699
u004062344
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s, w = list(map(int, input("sとw入力して").split()))\n\nif w >= s:\n print("unsafe")\nelse:\n print("safe")', 's, w = list(map(int, input().split()))\n\nif w >= s:\n print("unsafe")\nelse:\n print("safe")']
['Wrong Answer', 'Accepted']
['s974827862', 's623168866']
[9008.0, 9172.0]
[21.0, 21.0]
[113, 94]
p02699
u004823354
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S = int(input())\nW = int(input())\nif S > W:\n print("safe")\nelse:\n print("unsafe")', 'S = int(input())\nW = int(input())\nif S > W:\n print("safe")\nelse:\n print("unsafe")', 'S = int(input())\nW = int(input())\nif W >= S:\n print("unsafe")\nelse:\n print("safe")', "s, w = map(int, input().split())\n \nif s...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s871122720', 's929891939', 's999074280', 's903532159']
[9160.0, 9064.0, 8836.0, 9092.0]
[27.0, 23.0, 25.0, 28.0]
[83, 83, 84, 85]
p02699
u005960309
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S = input()\n\ncount = 0\n\nfor i in len(S):\n for j in range(i, len(S)):\n if int(S[i:j]) % 2019 == 0:\n count += 1\n \n \nprint(count)', "S, W = map(int, input().split())\nif S <= W:\n print('unsafe')\nelse:\n print('safe')"]
['Runtime Error', 'Accepted']
['s897601721', 's118277709']
[9108.0, 9160.0]
[21.0, 20.0]
[157, 83]
p02699
u007738720
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["a,b,c,d=map(int,input().split())\nwhile True:\n c-=b\n if c<=0:\n print('Yes')\n break\n a-=d\n if a<=0:\n print('No')\n break", "S,W=map(int,input().split())\nwhile 1<=S<=100:\n while 1<=W<=100:\n if S>W:\n print('safe')\n else:\n print('unsafe')", "S,W=map(int,input().split())\n\nif...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s261278783', 's285719715', 's815492702']
[9168.0, 54704.0, 9164.0]
[23.0, 2276.0, 23.0]
[133, 128, 77]
p02699
u008022357
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['A, B, C, D = map(int,input().split())\n\nwhile(A or C != 0):\n C = C - B\n if(C <= 0):\n print("Yes")\n break\n A = A - D\n if(A <= 0):\n print("No")\n break', 's, w = map(int,input().split())\n\nif(s <= w):\n print("unsafe")\nelse:\n print("safe")']
['Runtime Error', 'Accepted']
['s415157222', 's236642494']
[9176.0, 9088.0]
[22.0, 20.0]
[187, 88]
p02699
u010576583
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a, b = raw_input()\nif a < b:\n print(unsafe)\nelse:\n print(safe)', 'a, b = input()\nif a < b:\n print(unsafe)\nelse:\n print(safe)', "s = input()\nl = [int(item) for item in s.split()]\nif l[0] <= l[1]:\n print('unsafe')\nelse:\n print('safe')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s260233739', 's550090152', 's679248543']
[8944.0, 8952.0, 9156.0]
[23.0, 21.0, 23.0]
[64, 60, 106]
p02699
u011202375
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['A,B=map(int,input().split())\nprint("safe" if S>W else "unsafe")', 'A,B=map(int,input().split())\nprint("safe" if A>B else "unsafe")']
['Runtime Error', 'Accepted']
['s995903916', 's051140590']
[9156.0, 9052.0]
[25.0, 25.0]
[63, 63]
p02699
u018258333
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s,w = map(int,input().split())\n\nif s>=w:\n print('unsafe')\nelse:\n print('safe')", "s,w = map(int,input().split())\n\nif s<=w:\n print('unsafe')\nelse:\n print('safe')"]
['Wrong Answer', 'Accepted']
['s004531904', 's011590830']
[9164.0, 9108.0]
[22.0, 24.0]
[80, 80]
p02699
u018846452
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s, w = map(int, input().split())\nif s < w:\n print('safe')\nelse:\n print('unsafe')", "s, w = map(int, input().split())\nif s > w:\n print('safe')\nelse:\n print('unsafe')"]
['Wrong Answer', 'Accepted']
['s748444015', 's498016302']
[9032.0, 9080.0]
[27.0, 29.0]
[82, 82]
p02699
u021019433
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s, w = map(int, input().split())\nprint('un'*(s>=w)+'safe')", "s, w = map(int, input().split())\nprint('un'*(s<=w)+'safe')"]
['Wrong Answer', 'Accepted']
['s180107083', 's073667874']
[9152.0, 9148.0]
[23.0, 22.0]
[58, 58]
p02699
u021387650
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S,W = map(int,input().split())\n\nif s <= w:\n print('unsafe')\nelse:\n print('safe')", "A,B,C,D = map(int,input().split())\n \nTakahashi = A\nAoki = C\n \nwhile Takahashi >= 0 or Aoki >=0:\n Aoki -= B\n if Aoki <= 0:\n print('Yes')\n break\n Takahashi -= D\n if Takahashi <= 0:\n print('No')\n break...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s023559370', 's444780129', 's484719698', 's169768225']
[9052.0, 9096.0, 9196.0, 9160.0]
[24.0, 24.0, 24.0, 21.0]
[82, 214, 212, 83]
p02699
u021770165
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s = int(input())\nw = int(input())\n\nif w >= s:\n print("unsafe")\nelif w < s:\n print("safe")', 's,w = map(int,input().split())\nif w >= s:\n print("unsafe")\nelif w < s:\n print("safe")']
['Runtime Error', 'Accepted']
['s762884086', 's456267198']
[9096.0, 9160.0]
[25.0, 28.0]
[91, 88]
p02699
u021851796
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S,W = map(int, input().split())\nif S>W:\n print("safe")\nelse:\n print("unsafe)', 's,w = int(input())\nif s>w:\n print("safe")\nelse:\n print("unsafe)', 's,w = int(input())\nif s>w:\n print("safe")\nelse:\n print("unsafe")', 'S,W = map(int, input().split())\nif S>W:\n print("safe")\nelse:\n print("unsafe")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s099366760', 's739755488', 's763613379', 's037909381']
[8960.0, 9020.0, 9156.0, 9156.0]
[22.0, 21.0, 19.0, 22.0]
[78, 65, 66, 79]
p02699
u026788530
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s,w=[int(x) for x in input().splir()]\n\nif(s>w):\n print("safe")\nelse:\n print("unsafe")', 's,w=[int(x) for x in input().split()]\n \nif(s>w):\n print("safe")\nelse:\n print("unsafe")']
['Runtime Error', 'Accepted']
['s455850225', 's344213276']
[9096.0, 9096.0]
[23.0, 24.0]
[87, 88]
p02699
u032798323
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S,W = list(map(int,input().split()))\n\nif S =< W:\n print("unsafe")\nelse:\n print("safe")', 'S,W = list(map(int,input().split()))\n\nif S <= W:\n print("unsafe")\nelse:\n print("safe")']
['Runtime Error', 'Accepted']
['s373145824', 's911841804']
[8832.0, 9156.0]
[24.0, 21.0]
[92, 92]
p02699
u038408819
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s = input()\ncnt = 0\nans = []\nfor i in range(0, len(s) - 3):\n j = i\n num = ''\n while j < len(s):\n juhuku = 0\n num += s[j]\n if int(num) % 2019 == 0 and num != '0':\n #print(i, j)\n if j not in ans:\n ans.append(j)\n juhuku = ans.coun...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s541681832', 's950620907', 's980350538', 's452403195']
[9076.0, 9072.0, 9144.0, 9156.0]
[23.0, 22.0, 24.0, 22.0]
[369, 370, 366, 87]
p02699
u039189422
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s=input()\n\nd=[0]*2019\ndp=0\nd[0]+=1\nl=len(s)\n\nfor i in range(l-1,-1,-1):\n\tdp = (dp+int(s[i])*(10**(l-1-i)))%2019\n\td[dp]+=1\nres=0\n\nfor a in d:\n\tres+=a*(a-1)//2\n\t\nprint(res)', 's,w=map(int,input().split())\nprint("safe") if s>w else print("unsafe")']
['Runtime Error', 'Accepted']
['s617251641', 's597716793']
[9216.0, 9088.0]
[21.0, 21.0]
[170, 70]
p02699
u039934639
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['import collections\n\nN = int(input())\nS = [input() for i in range(N)]\n\nans = collections.Counter(S)\nprint(len(ans))', "S, W = map(int, input().split())\nif S <= W:\n print('unsafe')\nelse:\n print('safe')\n "]
['Runtime Error', 'Accepted']
['s203979480', 's298247406']
[9404.0, 9148.0]
[26.0, 20.0]
[114, 86]
p02699
u040642458
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S,W=input(),sep(",")\nS=int(S)\n\nW=int(W)\n\nif W >= S:\n print("unsafe")\n else:\n print("safe")\n', 'S=input()\nS=int(S)\n\nW=input()\nW=int(W)\n\nif W>S:\n print("unsafe")\n else:\n print("safe")', 'S=input()\nS=int(S)\n\nW=input()\nW=int(W)\n\nif W>=S:\n print("unsafe")\nelse:\n print("safe")\n', '...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s182484275', 's431845155', 's603565950', 's728360699', 's793474683', 's892589369', 's966044931', 's966808836', 's986729540', 's856035243']
[8924.0, 9028.0, 9076.0, 8964.0, 9056.0, 8968.0, 9036.0, 8964.0, 9100.0, 9156.0]
[23.0, 19.0, 20.0, 21.0, 21.0, 22.0, 21.0, 22.0, 23.0, 23.0]
[96, 91, 91, 93, 97, 92, 92, 91, 94, 100]
p02699
u042558137
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S, W = map(int, input().split())\nif W >= S:\n print('safe')\nelse:\n print('unsafe')", "S, W = map(int, input().split())\n\nif W >= S:\n print('unsafe')\nelse:\n print('safe')"]
['Wrong Answer', 'Accepted']
['s290102707', 's989050887']
[9160.0, 9160.0]
[23.0, 23.0]
[87, 88]
p02699
u044459372
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["def main():\n s, w = map(int, input().split())\n print('unsefe' if w >= s else 'safe')\n\nif __name__ == '__main__':\n main()", "def main():\n s, w = map(int, input().split())\n print('unsafe' if w >= s else 'safe')\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s115759453', 's172265899']
[9140.0, 9112.0]
[21.0, 22.0]
[129, 129]
p02699
u046190224
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["W:int\nS:int\n\nif W >= S:\n print('unsafe')\nelse:\n print('safe')", 'if W >= S:\n return "unsafe"\nelse:\n return "safe"', "W,S = [int(x) for x in input().split()]\n \nif W >= S:\n print('unsafe')\nelse:\n print('safe')", 'if W >= S:\n print("unsafe")\nelse:\n print("safe")', "if W >= S:\n print('unsafe')\...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s164949786', 's194763383', 's198585130', 's359569159', 's396067810', 's420247236', 's677752208', 's811019632', 's492757492']
[9012.0, 8972.0, 9160.0, 8976.0, 9080.0, 9120.0, 9104.0, 9080.0, 9068.0]
[21.0, 23.0, 22.0, 21.0, 22.0, 27.0, 21.0, 24.0, 22.0]
[63, 50, 92, 50, 50, 136, 91, 49, 93]
p02699
u048546501
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["a,b=map(int,input().sprit())\nif a<=b:print('unsafe')\nelse:print('safe')", "a,b=map(int,input().sprit())\nif a>b:print('unsafe')\nelse:print('safe')", "a,b=map(int,input().split())\nif a<=b: print('unsafe')\nelse: print('safe')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s390334513', 's407919922', 's174593369']
[9064.0, 9032.0, 9108.0]
[21.0, 24.0, 20.0]
[71, 70, 73]
p02699
u048872153
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s,w = int(input().split())\nif w > s:\n print("unsafe") \nelse:\n print("safe")', 's,w = map(int,input().split())\nif w > s or w = s:\n print("unsafe") \nelse:\n print("safe")', 's,w = map(int,input().split())\nif w > s or w == s:\n print("unsafe") \nelse:\n print("safe")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s533154568', 's547324258', 's358259595']
[8872.0, 8996.0, 9164.0]
[26.0, 20.0, 20.0]
[77, 90, 91]
p02699
u051298937
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a,b,c,d = map(int,input().split())\nfor i in range(100):\n if c-b <= 0:\n print("yes")\n break\n elif a-d <= 0:\n print("No")\n break\n else:\n a = a-d\n c = c-b', 's,w = map(int,input().split())\nif s <= w:\n print("unsafe")\nelse:\n print("safe")']
['Runtime Error', 'Accepted']
['s648478983', 's071750459']
[9200.0, 9156.0]
[22.0, 21.0]
[203, 85]
p02699
u053155838
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['x , y = map(int, input().split())\nif x>=y :\n print("unsafe")\nelse:\n print("safe")', 'x, y = map(int,input().split())\nif x<y:\n print("unsafe")\nelse:\n print("safe\')', 's, w = map(int,input().split())\nif w>=s:\n print("unsafe")\nelse:\n print("safe")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s274334348', 's464968045', 's840280452']
[9160.0, 8956.0, 9156.0]
[21.0, 24.0, 24.0]
[83, 79, 80]
p02699
u055668007
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["A,B,C,D = map(int,input().split())\n\nX = A // D\nY = C // B\n\nif A % D > 0:\n X += 1\n\nif C % B > 0:\n Y += 1\n\nif Y > X:\n print('No')\nelse :\n print('Yes')", "X,Y = map(int,input().split())\n\nif X > Y:\n print('safe')\nelse:\n print('unsafe')\n \n"]
['Runtime Error', 'Accepted']
['s727954329', 's106279111']
[9112.0, 9148.0]
[21.0, 20.0]
[152, 87]
p02699
u057993957
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s = input()\n\ncnt = 0\nfor i in range(len(s)):\n for j in range(i+1, len(s)+1):\n if int(s[i:j]) % 2019 == 0:\n cnt += 1\nprint(cnt)', 's, w = list(map(int, input().split()))\n\nprint("unsafe" if s <= w else "safe")']
['Runtime Error', 'Accepted']
['s911758490', 's596140347']
[9060.0, 9148.0]
[20.0, 24.0]
[147, 77]
p02699
u058264533
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['from sys import stdin\ninput = stdin.readline\n\nimport sys\n\nA, B, C, D= map(int, input().split())\n\nif C - B <= 0:\n print("yes")\n sys.exit()\nelif A - D <= 0:\n print("No")\n sys.exit()\n\naoki = C - B\ntaka = A - D\n\nfor i in range(1000):\n aoki -= B\n if aoki <= 0:\n print("Yes")\n ...
['Runtime Error', 'Accepted']
['s273565704', 's893271536']
[9068.0, 9160.0]
[24.0, 24.0]
[385, 134]
p02699
u060012100
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S= int(input())\nW= int(input())\nif(W>=S):\n print("unsafe")\nelse:\n print("safe")', 'S,W =map(int,input().split())\nif(W>=S):\n print("unsafe")\nelse:\n print("safe")\n']
['Runtime Error', 'Accepted']
['s869892162', 's184121013']
[9148.0, 9108.0]
[24.0, 23.0]
[81, 80]
p02699
u061566631
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['import sys\ninput = sys.stdin.readline\n\n\ndef main():\n S = input().strip()\n answer = []\n for i in range(1, len(S)+1):\n [answer.append(j) for j in range(i+4, len(S)+1)\n if int(S[i-1:j]) % 2019 == 0]\n print(len(answer))\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\ninpu...
['Runtime Error', 'Accepted']
['s276703431', 's082947888']
[9168.0, 9176.0]
[24.0, 23.0]
[283, 177]
p02699
u065994196
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['def check(a,b,c,d):\n\twhile(a>0 and c>0):\n\t\tc-=b\n\t\tif(c==0):\n\t\t\treturn 1\n\t\ta-=d\n\t\tif(a==0):\n\t\t\treturn 0\n\tif(a<0):\n\t\treturn 0\n\tif(c < 0):\n\t\treturn 1\ninp1=list(map(int,input().strip().split()))[:4]\na,b,c,d=inp1[0],inp1[1],inp1[2],inp1[3]\nif(check(a,b,c,d)):\n\tprint("Yes")\nelse:\n\tpr...
['Runtime Error', 'Runtime Error', 'Accepted']
['s076376891', 's429067177', 's488100374']
[9148.0, 8968.0, 9168.0]
[23.0, 24.0, 22.0]
[287, 286, 117]
p02699
u067986264
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S, W = map(int, input().split())\nif S =< W:\n print("unsafe")\nelse:\n print("safe")\n', 'S, W = map(int, input().split())\nif S <= W:\n print("unsafe")\nelse:\n print("safe")\n']
['Runtime Error', 'Accepted']
['s451720116', 's219494102']
[8964.0, 9152.0]
[20.0, 23.0]
[88, 88]
p02699
u068727970
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S, W = map(int, input().split())\nif W >= S:\n print('unsage')\nelse:\n print('safe')\n", "S, W = map(int, input().split())\nif W >= S:\n print('unsafe')\nelse:\n print('safe')\n"]
['Wrong Answer', 'Accepted']
['s013017605', 's606875815']
[9152.0, 9152.0]
[23.0, 24.0]
[88, 88]
p02699
u069479805
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['takahashi_h, takahashi_a, aoki_h, aoki_a = map(int, input().split())\n\nif takahashi_h // aoki_a < aoki_h // takahashi_a:\n print("Yes")\nelif takahashi_h // aoki_a > aoki_h // takahashi_a:\n print("No")\nelse:\n takahashi_h = takahashi_h - (aoki_a * (takahashi_h // aoki_a))\n aoki_h = aoki_h - (takahashi...
['Runtime Error', 'Runtime Error', 'Accepted']
['s314600570', 's360660497', 's096574186']
[9096.0, 9084.0, 9100.0]
[26.0, 21.0, 21.0]
[435, 435, 86]
p02699
u075303794
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nS,W = map(int, readline())\n\n\nif S > W:\n print('safe')\nelse:\n print('unsafe')", "import sys\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.b...
['Runtime Error', 'Accepted']
['s918808932', 's351558919']
[9172.0, 9220.0]
[24.0, 20.0]
[196, 208]
p02699
u075304271
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["import math\nimport collections\nimport fractions\nimport itertools\n \ndef solve():\n n = int(input())\n s = [input() for i in range(n)]\n print(len(set(s)))\n return 0\n \nif __name__ == '__main__':\n solve()", 'import itertools\n\ndef solve():\n s, w = map(int, input().split())\n if s > w:\n pr...
['Runtime Error', 'Accepted']
['s704089925', 's114051414']
[10460.0, 9108.0]
[34.0, 22.0]
[213, 174]
p02699
u075595666
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s,w = map(int,input().split())\nif s>w/2 :\n print('safe')\nelse:\n print('unsafe')", "s,w = map(int,input().split())\nif s>w :\n print('safe')\nelse:\n print('unsafe')\n"]
['Wrong Answer', 'Accepted']
['s010123232', 's791171150']
[9156.0, 9148.0]
[26.0, 22.0]
[81, 80]
p02699
u079022116
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s,w=map(int,input().split())\nif n <= m:\n print('unsafe')\nelse:\n print('safe')", "s,w=map(int,input().split())\nif s <= w:\n print('unsafe')\nelse:\n print('safe')"]
['Runtime Error', 'Accepted']
['s957870895', 's100435573']
[9180.0, 9184.0]
[20.0, 23.0]
[79, 79]
p02699
u080490408
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a=int(input())\nb,c=[int(x) for x in input().split()]\ns=input()\nprint(a+b+c, s)\n\n', 'b,c=[int(x) for x in input().split()]\nif c>=b:\n print("unsafe")\nelse:\n print("safe")\n']
['Runtime Error', 'Accepted']
['s304255373', 's923703722']
[9096.0, 9156.0]
[22.0, 24.0]
[80, 91]
p02699
u083874202
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['A, B, C, D = map(int, input().split())\n\nThit = A\nTatk = B\nAhit = C\nAatk = D\nwin = False\n\nwhile Thit < 0 or Ahit < 0:\n Ahit = Ahit - Tatk\n if Ahit < 0:\n win = True\n break\n Thit = Thit - Aatk\n if Thit < 0:\n break\n\nif win:\n print("Yes")\nelse:\n print("No")', "imp...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s305182376', 's307446462', 's435413988', 's173244986']
[9192.0, 9156.0, 9132.0, 9036.0]
[24.0, 20.0, 22.0, 23.0]
[291, 340, 296, 340]
p02699
u086624329
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S=int(input())\nW=int(input())\n\nif S<=W:\n print('unsafe')\n \nelse:\n print('safe')", "if S<=W:\n print('unsafe')\n \nelse:\n print('safe')", "S,W=map(int,input().split())\n\nif S<=W:\n print('unsafe')\n \nelse:\n print('safe')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s121952153', 's889975187', 's162964578']
[9084.0, 8932.0, 9100.0]
[20.0, 20.0, 22.0]
[88, 57, 87]
p02699
u088115428
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a,b = map(int, input().split())\nif a>b:\n print("Safe")\nelse:\n print("Unsafe")', '# cook your dish here\na,b = map(int, input().split())\nif a>b:\n print("safe")\nelse:\n print("unsafe")']
['Wrong Answer', 'Accepted']
['s960677313', 's906548912']
[9160.0, 9100.0]
[23.0, 23.0]
[80, 102]
p02699
u088821409
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['s , w = int(input())\n\nif s > w:\n print("safe")\nelse:\n print("unsafe")', 's , w = map(int, input().split())\n\nif s > w:\n print("safe")\nelse:\n print("unsafe")']
['Runtime Error', 'Accepted']
['s982562211', 's392831115']
[9092.0, 9172.0]
[22.0, 22.0]
[71, 84]
p02699
u089504174
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["s,w=int(input().split())\nif w>=s:\n print('unsafe')\nelse:\n print('safe')", "s,w=map(int,input().split())\nif w>=s:\n print('unsafe')\nelse:\n print('safe')\n"]
['Runtime Error', 'Accepted']
['s741771786', 's212000875']
[9088.0, 9116.0]
[24.0, 20.0]
[73, 78]
p02699
u089786098
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a, b, c, d = input().split()\na = int(a)\nb = int(b)\nc = int(c)\nd = int(d)\n\nx = a//d +1\ny = c//b\n\nif y == 1:\n if x <= y:\n \tprint("No")\n print("No")\nelse:\n print("Yes")', 'a, b, c, d = input().split()\na = int(a)\nb = int(b)\nc = int(c)\nd = int(d)\n\nx = a//d +1\ny = c//b\n\nif y == 1:\n if x <= y:\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s034371830', 's195687948', 's810440064']
[9112.0, 9060.0, 9164.0]
[23.0, 21.0, 20.0]
[183, 194, 95]
p02699
u090068671
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S, W = map(lambda x: int(x), input().split())\nif S > W:\n print('safe')\n else:\n print('unsafe')", "S, W = map(lambda x: int(x), input().split())\nif S > W:\n print('safe')\nelse:\n print('unsafe')"]
['Runtime Error', 'Accepted']
['s387925464', 's201273007']
[9012.0, 9164.0]
[23.0, 22.0]
[99, 95]
p02699
u090406054
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["if S =< W :\n print('unsafe')\n \nelse:\n print('safe')\n", "if int('S') =< int('W') :\n print('unsafe')\n \nelse:\n print('safe')", "S, W = map(int, input().split())\nif S =< W:\n print('unsafe')\n \nelse:\n print('safe')", "S = input()\nW = input()\nif int(S) =< int(W):\n print('unsafe')\n \nelse: \n prin...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s056969285', 's851395530', 's905525463', 's912348367', 's236477595']
[8944.0, 9004.0, 8944.0, 9004.0, 9148.0]
[23.0, 20.0, 25.0, 21.0, 22.0]
[54, 67, 86, 87, 87]
p02699
u091412190
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["S,W = map(int,input().split())\nif W >= S:\n print('false')\nelse:\n print('safe')", "S,W = map(int,input().split)\nif S >= W:\n print('unsafe')\nelse:\n print('safe')", "S,W = map(int,input().split())\nif W >= S:\n print('false')\nelse:\n print('safe')", "S,W = map(int,input().split())\nif W >= S:\n print('un...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s046907692', 's312008570', 's449120063', 's237268967']
[9156.0, 8836.0, 9160.0, 9088.0]
[21.0, 20.0, 22.0, 23.0]
[80, 79, 80, 82]
p02699
u093522707
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S = int(input())\nW = int(input())\nif S > W:\n print("safe")\nelse:\n print("unsafe")', 'S = input()\nW = input()\nif S > W:\n print("safe")\nelse:\n print("unsafe")', 'S, W = map(int, input().split())\nif S > W:\n print("safe")\n else:\n print("unsafe")', 'S, W = map(int, input().split())\nif S > W:\n pri...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s319856925', 's532017390', 's624093955', 's471350826']
[9148.0, 9088.0, 9024.0, 9164.0]
[22.0, 24.0, 21.0, 21.0]
[83, 73, 86, 82]
p02699
u095676321
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['import tensorflow\nS, W = map(int, input().split())\ndef f():\n if W >= S:\n return "unsafe"\n else:\n return "safe"\nprint(f())\n', 'S, W = map(int, input().split())\ndef f():\n if W >= S:\n return "unsafe"\n else:\n return "safe"\nprint(f())\n']
['Runtime Error', 'Accepted']
['s454148210', 's729717776']
[9032.0, 9160.0]
[21.0, 24.0]
[130, 112]
p02699
u097069712
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['S=int(input())\nW=10\n\nif S>W:\n\tprint("safe")\nif S<W:\n\tprint("unsafe")', 'S,W=map(int, input().split())\n \nif S>W:\n\tprint("safe")\nif S<W:\n\tprint("unsafe")\nif S=W:\n\tprint("unsafe")', 'S=input()\nW=10\nif S>W:\n\tprint("safe")\nif W>S:\n\tprint("unsafe")', 'S=int(input())\nW=10\n \nif S>W:\n\tprint("safe...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s091026857', 's227869647', 's470411534', 's671770025', 's054768145']
[9100.0, 8964.0, 9100.0, 8756.0, 9164.0]
[22.0, 22.0, 22.0, 23.0, 23.0]
[68, 104, 62, 95, 105]
p02699
u098407852
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
["sheep = input()\nwolves = input()\n\nif sheep > wolves:\n print('safe')\nelse:\n print('unsafe')", "import sys\n\nsheep,wolves = (int(x) for x in input().split())\n\nif sheep > wolves:\n print('safe')\nelse:\n print('unsafe')"]
['Runtime Error', 'Accepted']
['s345531304', 's403154929']
[9024.0, 9160.0]
[23.0, 21.0]
[96, 124]
p02699
u099187672
2,000
1,048,576
There are S sheep and W wolves. If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep. If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
['a,b,c,d = map(int,input().split())\n\naoki_new = (a+d-1)/d\ntaka_new1 = (a+b-1)/b\n\nif taka_new1 <= aoki_new :\n\tprint("Yes") #takahasi is loses because its heath is zero first\nelse:\n\tprint("No")\n\n\n\n\n', 'a,b,c,d = map(int,input().split())\n\naoki_new = (a+d-1)/d\ntaka_new1 = (a+b-1)/b\n\nif taka_new1 < aoki...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s436988121', 's699827002', 's795392934', 's417944464']
[9164.0, 9164.0, 9016.0, 9096.0]
[21.0, 20.0, 21.0, 21.0]
[195, 194, 194, 90]