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
|
---|---|---|---|---|---|---|---|---|---|---|
p03292 | u492447501 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["*A, = map(int, input().split())\n\nmin = float('inf')\n\nfor i in range(3):\n\tfor j in range(3):\n\t\tif i==j:\n break\n min = min(abs(A[i]-A[j]), min)\n\nprint(min)", "import itertools\n\n*A, = map(int, input().split())\n\nL = itertools.permutations(A)\n\nmin = float('inf')\n\nfor l in L:\n temp = abs(l[1]-l[0])+abs(l[2]-l[1])\n if min > temp:\n min = temp\nprint(min)"] | ['Runtime Error', 'Accepted'] | ['s961704366', 's229898487'] | [2940.0, 3060.0] | [17.0, 17.0] | [169, 204] |
p03292 | u496344397 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['# -*- coding: utf-8 -*-\n\nimport functools\n\nN = input()\nnumbers = list(map(int, input().split()))\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a if a > 0 else 1\n\nmax_under_lcm = functools.reduce(lambda x, y: int((x * y) / gcd(x,y)), numbers) - 1\nanswer = sum([ max_under_lcm % n for n in numbers])\n\nprint(answer)', 'import functools\nimport fractions\n\nN = int(input())\nnumbers = list(map(int, input().split()))\n\nmax_under_lcm = functools.reduce(lambda x, y: int((x * y) / fractions.gcd(x,y)), numbers) - 1\nanswer = sum([max_under_lcm % n for n in numbers])\n\nprint(answer)', '# -*- coding: utf-8 -*-\n\ntasks = list(map(int, input().split()))\nanswer = max(tasks) - min(tasks)\nprint(answer)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s168928398', 's445997891', 's589214134'] | [3572.0, 5124.0, 2940.0] | [23.0, 36.0, 17.0] | [330, 254, 111] |
p03292 | u502731482 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\n\na.sort()\nans = 0:\nfor i in range(1, 3):\n ans += abs(a[i] - a[i - 1])\n\nprint(ans)', 'a = list(map(int, input().split()))\n\na.sort()\nans = 0\nfor i in range(1, 3):\n ans += abs(a[i] - a[i - 1])\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s810405918', 's583657876'] | [2940.0, 2940.0] | [20.0, 17.0] | [120, 119] |
p03292 | u503111914 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c = map(int,input().split())\nA = [a,b,c]\nA.sort()\nprint(a[2]-a[0])\n', 'a,b,c = map(int,input().split())\nA = [a,b,c]\nA.sort()\nprint(A[2]-A[0])'] | ['Runtime Error', 'Accepted'] | ['s923636234', 's294489481'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 70] |
p03292 | u506858457 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['*a=map(int,input().split())\nprint(max(a)-min(a))', 'list1=list(map(int,input().split()))\nlist1.sort()\nprint(list1[-1]-list1[0])'] | ['Runtime Error', 'Accepted'] | ['s640685271', 's162776673'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 75] |
p03292 | u517910772 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['cost = 0\na, b, c = (map(int, input().split()))\ntasks = [a, b, c]\n\ntasks.remove(max(tasks))\ncost += 0\nprint(tasks)\ntask = min(tasks)\ntasks.remove(task)\nprint(task, tasks)\ncost += task\n\ncost += (tasks[0] - task)\n\nprint(cost)\n', 'cost = 0\na, b, c = (map(int, input().split()))\ntasks = [a, b, c]\n\ntasks.remove(max(tasks))\ncost += 0\n\ntask = min(tasks)\ntasks.remove(task)\ncost += task\n\ncost += (tasks[0] - task)\nprint(cost)\n', 'cost = 0\na, b, c = (map(int, input().split()))\ntasks = [a, b, c]\n\ntasks.remove(max(tasks))\ncost += 0\n\ntask = min(tasks)\ncost += task\n\ncost += tasks[0] - task\n\nprint(cost)\n', 'cost = 0\na, b, c = (map(int, input().split()))\ntasks = [a, b, c]\n\ntasks.sort()\n\nj = min(tasks)\ntasks.remove(j)\n\nfor i in tasks:\n cost += (i - j)\n j = i\n\nprint(cost)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s390010188', 's685918316', 's748141011', 's778213715'] | [3060.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [223, 191, 171, 171] |
p03292 | u519939795 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['Not found', 'A = list(map(int, input().split()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s493746463', 's657785341'] | [2940.0, 2940.0] | [17.0, 17.0] | [9, 56] |
p03292 | u523781418 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a1, a2, a3=map(int, input().split())\ntemp=[a1, a2, a3]\nprint(a3-a1)', 'a1, a2, a3=map(int, input().split())\ntemp=[a1, a2, a3]\ntemp.sort()\nprint(temp[2]-temp[0])'] | ['Wrong Answer', 'Accepted'] | ['s089403148', 's525788757'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 89] |
p03292 | u529438431 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["# coding: utf-8\n\nS = input()\nT = input()\nf=0\nfor i in range(len(S)+1):\n if S == T:\n print('Yes')\n f=1\n break\n S = (S[-1]+S)[:-1]\nif f==0:\n print('No')", "# coding: utf-8\n\nS = input()\nT = input()\nf=0\nfor i in range(len(S)+1):\n if S == T:\n f=1\n S = (S[-1]+S)[:-1]\n \nif f==0:\n print('No')\nelse:\n print('Yes')", '# coding: utf-8\n\nA = list(map(int,input().split()))\nA.sort(reverse = True)\nans = 0\nA.append(A[-1])\nfor i in range(len(A)-1):\n ans +=A[i]-A[i+1]\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s008335004', 's519142622', 's478094640'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0] | [328, 321, 157] |
p03292 | u533084327 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['import numpy as np\nN = int(input())\na = list(map(int,input().split()))\na = np.array(a)\na = np.sort(a)[::-1]\nMAX = np.abs(np.prod(a))\n#print (MAX)\nFlag = True\nq = 0\nadd = a[0]\nsum = 0\nmax = np.sum(a)-len(a)\nn = a[0]*q+a[0]-1\nwhile True:\n st = np.sum(n%a)\n if sum < st:\n sum = st\n if sum == max:\n break\n ind = np.where(a - n%a == 1)[0]\n #print (ind)\n c = a[ind]\n n += np.prod(c)\n if n > MAX:\n break\n #print (sum)\nprint (sum)\n', 'import numpy as np\nN = int(input())\na = list(map(int,input().split()))\na = np.array(a)\na = np.sort(a)[::-1]\nMAX = np.abs(np.prod(a))\n#print (MAX)\nFlag = True\nq = 0\nadd = a[0]\nsum = 0\nmax = np.sum(a)-len(a)\nn = a[0]*q+a[0]-1\nwhile True:\n st = np.sum(n%a)\n if sum < st:\n sum = st\n if sum == max:\n break\n ind = np.where(a - n%a == 1)[0]\n #print (ind)\n c = a[ind]\n n += np.prod(c)\n if n > MAX:\n break\n #print (sum)\nprint (sum)\n', 'import numpy as np\na = list(map(int,input().split()))\na = np.array(a)\na = np.sort(a)[::-1]\nsum = a[0]-a[2]\nprint (sum)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s446250347', 's605150436', 's855955793'] | [21136.0, 12388.0, 21544.0] | [589.0, 153.0, 1796.0] | [471, 471, 119] |
p03292 | u537497369 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['def plo_A(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n \n return res', 'import itertools\n\n IP = input()\n \n A1 = int(IP[0])\n A2 = int(IP[2])\n A3 = int(IP[4])\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n print(res)\n\n', 'import itertools\n\ndef solve(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n print(res)\n \n return res\n', 'import itertools\n\n vec = input()\n \n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n print(res)\n\n', 'import itertools\n\n\ndef solve(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n \n return res\n', 'import itertools\n\n A1,A2,A3 = map(int,input().split())\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n print(res)\n\n', 'import itertools\n\n\ndef solve(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n \n return res\n\nres = solve(A1,A2,A3)\nprint(res)\n', 'import itertools\n\n\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n print(res)\n\n', 'import itertools\n\nA1,A2,A3 = map(int,input().split())\n \nvec = [A1,A2,A3]\ncom = list(itertools.permutations(vec))\n \nall_cos = [0,0,0,0,0,0]\nfor i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \nall_cos[i] = cos1 + cos2 + cos3\n \nres = min(all_cos)\nprint(res)\n\n', '# -*- coding: utf-8 -*-\n\n\nimport numpy as np\nimport itertools\n\n\ndef plo_A(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0;\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n \n return res,all_cos,com\n', '# -*- coding: utf-8 -*-\n\n\nimport numpy as np\nimport itertools\n\n\ndef plo_A(A1,A2,A3):\n \n vec = [A1,A2,A3]\n com = list(itertools.permutations(vec))\n \n \n all_cos = [0,0,0,0,0,0]\n for i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0;\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \n res = min(all_cos)\n \n return res\n', 'import itertools\n\nA1,A2,A3 = map(int,input().split())\n \nvec = [A1,A2,A3]\ncom = list(itertools.permutations(vec))\n \nall_cos = [0,0,0,0,0,0]\nfor i in range(6):\n tmp_com = com[i]\n \n tmp_A1 = tmp_com[0]\n tmp_A2 = tmp_com[1]\n tmp_A3 = tmp_com[2]\n \n cos1 = 0\n cos2 = abs(tmp_A1 - tmp_A2)\n cos3 = abs(tmp_A2 - tmp_A3)\n \n all_cos[i] = cos1 + cos2 + cos3\n \nres = min(all_cos)\nprint(res)\n\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s027176379', 's064704708', 's157218519', 's210319283', 's276188214', 's317568887', 's528949899', 's534987093', 's640986137', 's674565785', 's718413843', 's809560428'] | [3064.0, 2940.0, 3064.0, 2940.0, 3064.0, 2940.0, 3064.0, 2940.0, 3064.0, 21360.0, 21236.0, 3064.0] | [18.0, 19.0, 17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 18.0, 1552.0, 1280.0, 26.0] | [464, 541, 498, 456, 484, 498, 518, 459, 429, 624, 612, 433] |
p03292 | u538523244 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['import math\na, b, c = (int(i) for i in input().split()) \nl = []\nl.extend([abs(a-b),abs(b-c),abs(c-a)])\nl.sort()\nans = l[0] + l[1]', 'import math\na, b, c = (int(i) for i in input().split()) \nl = []\nl.extend([abs(a-b),abs(b-c),abs(c-a)])\nl.sort()\nans = l[0] + l[1]\n', 'import math\na, b, c = (int(i) for i in input().split()) \nl = []\nl.extend([abs(a-b),abs(b-c),abs(c-a)])\nl.sort()\nans = l[0] + l[1]\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s585601431', 's875799213', 's857681471'] | [3060.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [129, 130, 141] |
p03292 | u538956308 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = list(map(int,input().split()))\nans = []\na = abs(A(0)-A(1))+abs(A(1)-A(2))\nb = abs(A(0)-A(2))+abs(A(2)-A(1))\nc = abs(A(1)-A(0))+abs(A(0)-A(2))\nans.append(a)\nans.append(b)\nans.append(c)\nprint(min(ans))\n', 'A = list(map(int,input().split()))\nans = []\na = abs(A[0]-A[1])+abs(A[1]-A[2])\nb = abs(A[0]-A[2])+abs(A[2]-A[1])\nc = abs(A[1]-A[0])+abs(A[0]-A[2])\nans.append(a)\nans.append(b)\nans.append(c)\nprint(min(ans))\n'] | ['Runtime Error', 'Accepted'] | ['s321161163', 's150768344'] | [3064.0, 3188.0] | [18.0, 18.0] | [237, 237] |
p03292 | u544050502 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['cost_list=list(map(int,input().split())\ncost_list.sort(reverse=True)\nsum=0\nfor i in range(len(cost_list)-1):\n sum+=(cost_list[i]-cost_list[i+1])\nprint(sum)', 'cost_list=list(map(int,input().split())\ncost_list.sort(reverse=True)\nsum=0\nfor i in range(len(cost_list)-1):\n sum+=cost_list[i]-cost_list[i+1]\nprint(sum)', '*cost_list=map(int,input().split())\ncost_list.sort(reverse=True)\nsum=0\nfor i in range(len(cost_list)-1):\n sum+=(cost_list[i]-cost_list[i+1])\nprint(sum)', '*cost_list,=map(int,input().split())\nprint(max(cost_list)-min(cost_list))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s148750949', 's203129680', 's956100548', 's032188485'] | [2940.0, 2940.0, 2940.0, 2940.0] | [19.0, 18.0, 18.0, 18.0] | [156, 154, 152, 73] |
p03292 | u546853743 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['\nS=list(map(int,input().split()))\nS.sort\nsum=0\nsum += (S[2]-S[0])\nprint(sum)', '\nS=list(map(int,input().split()))\nS.sort\nsum=0\nsum += (S[1]-S[0])+(S[2]-S[1])\nprint(sum)', '\nS=list(map(int,input().split()))\nS.sort()\nsum=0\nsum += (S[2]-S[0])\nprint(sum)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s070556088', 's455161734', 's815438160'] | [9156.0, 9072.0, 9112.0] | [28.0, 32.0, 27.0] | [76, 88, 78] |
p03292 | u550895180 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['import sys\n\ndef solve(a,b,c):\n f = [a,b,c]\n f.sort()\n #print(f)\n x = 0\n y = 0\n\n if a == b and b == c :\n return 0\n else:\n x = f[1] - f[0]\n y = f[2] - f[1]\n return x+y\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n a = int(ws[0])\n b = int(ws[1])\n c = int(ws[2])\n return (a, b, c,)\n\ndef main():\n solve(*readQuestion())\n\n# Uncomment before submission\n main()', "import sys\n\n\ndef solve(a,b,c):\n f = [a,b,c]\n f.sort()\n #print(f)\n x = 0\n y = 0\n\n if a == b and b == c :\n return 0\n else:\n x = f[1] - f[0]\n y = f[2] - f[1]\n return x+y\n\ndef readQuestion():\n line = sys.stdin.readline().rstrip()\n [str_a, str_b, str_c] = line.split(' ')\n return (int(str_a), int(str_b), int(str_c))\n\ndef main():\n a, b, c = readQuestion()\n answer = solve(a, b, c)\n print(answer)\n \nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s591161778', 's369838826'] | [3064.0, 3064.0] | [18.0, 18.0] | [442, 661] |
p03292 | u553055160 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['line = input()\nwords = line.split()\nnum_list = []\nfor word in words:\n num_list.append(int(word))\nans = 0\nfor num in num_list:\n ans = ans + num-1\n\nprint(ans)', 'line = input()\nwords = line.split()\n\nnum_list = []\nfor elm in words:\n num_list.append(int(elm))\n\nnum_list.sort()\nscore = 0\nfor i, num in enumerate(num_list):\n if i < (len(num_list) - 1):\n score += (abs(num_list[i] - num_list[i+1]))\n else:\n break\n\nprint(score)\n'] | ['Wrong Answer', 'Accepted'] | ['s913640775', 's191137407'] | [3060.0, 3060.0] | [17.0, 17.0] | [162, 283] |
p03292 | u555356625 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a, b, c = map(int, input().split())\n\nprint(max(abs(a-b), abs(b-c), abs(c-a))', 'a, b, c = map(int, input().split())\n\nprint(max(abs(a-b), abs(b-c), abs(c-a)))'] | ['Runtime Error', 'Accepted'] | ['s739440812', 's486909639'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 77] |
p03292 | u556225812 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = list(map(int, input().split())\nA.sort()\nprint(-A[0] + A[2])', 'A = list(map(int, input().split()))\nA.sort()\nprint(A[2] - A[0])'] | ['Runtime Error', 'Accepted'] | ['s790977735', 's863641696'] | [2940.0, 2940.0] | [17.0, 17.0] | [63, 63] |
p03292 | u562119930 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["import numpy\n\ns = list(input())\nt = input()\n\ntmp = s[:]\nfor i in range(len(tmp)):\n tmp = numpy.roll(tmp, 1)\n if ''.join(tmp) == t:\n print('Yes')\n exit()\nprint('No')\n", 'arr = [int(i) for i in input().split()]\narr.sort()\narr.reverse()\n\nresult = (arr[0] - arr[1]) + (arr[1] - arr[2])\nprint(result)\n'] | ['Runtime Error', 'Accepted'] | ['s221768549', 's679137290'] | [21364.0, 3064.0] | [1399.0, 17.0] | [185, 127] |
p03292 | u565204025 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['# -*- coding: utf-8 -*-\n\na = list(map(int,print().split()))\n\na.list()\n\nprint(+a[i+2]- a[i])\n', '# -*- coding: utf-8 -*-\n\na = list(map(int,print().split()))\n\na.list()\n\nprint(+a[i+2]- a[i])\n# -*- coding: utf-8 -*-\n\na = list(map(int,input().split()))\n\na.list()\n\nprint(+a[i+2]- a[i])', '# -*- coding: utf-8 -*-\n\na = list(map(int,input().split()))\n\na.sort()\n\nprint(a[2]- a[0])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s022168711', 's923035732', 's446745045'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [92, 183, 89] |
p03292 | u569272329 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = map(int, input())\nA = sorted(A)\nans = 0\nfor i in range(1, 3):\n ans += abs(A[i - 1] - A[i])\nprint(ans)\n', 'A = map(int, input().split())\nA = sorted(A)\nans = 0\nfor i in range(1, 3):\n ans += abs(A[i - 1] - A[i])\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s889909183', 's213347932'] | [3060.0, 2940.0] | [20.0, 17.0] | [109, 117] |
p03292 | u569970656 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a, b, c = map(int, input().split())\nprint(abs(b-a)+abs(c-b))', 'a = list(map(int, input().split()))\nprint(max(a) - min(a))'] | ['Wrong Answer', 'Accepted'] | ['s029904721', 's695926141'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 58] |
p03292 | u571444155 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\n\ns1 = 0\ns2 = 0\n\ns1 = abs(a[1] - a[0]) + abs(a[1] - a[2])\ns2 = abs(a[2] - a[0]) + abs(a[2] - a[1])\n\nprint(max(s1,s2))', 'n = int(input())\na = list(map(int, input().split()))\ns = []\nm = 1\n\ndef f(m, a):\n s_tmp = 0\n for i in range(n):\n s_tmp = s_tmp + m % a[i]\n return s_tmp\n\nfor i in range(n):\n m = m * a[i]\n\nprint(f(m-1, a))', 'a = list(map(int, input().split()))\n\na.sort()\n\nprint(a[2]- a[0])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s187568475', 's469693802', 's212811741'] | [3060.0, 3064.0, 2940.0] | [17.0, 17.0, 18.0] | [152, 221, 64] |
p03292 | u571445182 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["Tmp = []\nTmp = input().rstrip().split(' ')\n\nAns = []\n\nfor i in range(3):\n nTmp = int(Tmp[i])\n \n Ans.append(nTmp)\n\nAns.sort()\n\nnAns = (Ans[1]-Ans[0])\nnAns += Ans[2]-Ans[1]\n\n\n\n", "Tmp = []\nTmp = input().rstrip().split(' ')\n \nAns = []\n \nfor i in range(3):\n nTmp = int(Tmp[i])\n \n Ans.append(nTmp)\n \nAns.sort()\n \nnAns = (Ans[1]-Ans[0])\nnAns += Ans[2]-Ans[1]\n\nprint(nAns)\n\n"] | ['Wrong Answer', 'Accepted'] | ['s115931206', 's827840009'] | [2940.0, 3060.0] | [17.0, 17.0] | [177, 192] |
p03292 | u573754721 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c=map(int,input().split())\nd,e,f=abs(a-b),abs(a-c),abs(b-c)\nprint(d+e+f-min(d,e,f))', 'a,b,c=map(int,input().split())\nd,e,f=map(abs,a-b,a-c,b-c)\nprint(d+e+f-min(d,e,f))', 'L = list(map(int,input().split()))\nL.sort()\ns=0\nfor i in range(1,3):\n s+=L[i]-L[i-1]\nprint(s)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s413347151', 's889549526', 's569717160'] | [2940.0, 2940.0, 2940.0] | [20.0, 19.0, 17.0] | [87, 81, 95] |
p03292 | u574053975 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a=list(map(int,input().split()))\nb=[]\nc=[1]*(a[0]-1)\nfor i in range(a[1]):\n b.append(list(map(int,input().split())))\nb=sorted(b,key=lambda b:b[1])\nfor i in range(a[1]):\n if i!=0 and b[i-1][0]>=b[i][0]:\n continue\n if 0 in c[(b[i][0]-1):b[i][1]]:\n continue\n else:\n c[(b[i][1])-2]=0\n\nprint(c.count(0))', 'a=list(map(int,input().split()))\nout=abs(a[0]-a[1])\nfor i in range(3):\n if i ==0:\n b=a[1]\n c=a[2]\n elif i==1:\n b=a[0]\n c=a[2]\n else:\n b=a[0]\n c=a[1]\n if (abs(b-c)<out):\n out=abs(b-c)\n if (abs(c-b)<out):\n out=abs(c-b)\nprint(out)', 'a=list(map(int,input().split()))\nout=abs(a[1]-a[0])+abs(a[2]-a[1])\nfor i in range(3):\n if i ==0:\n b=a[1]\n c=a[2]\n elif i==1:\n b=a[0]\n c=a[2]\n else:\n b=a[0]\n c=a[1]\n if ((abs(b-a[i])+abs(c-b))<out):\n out=abs(b-a[i])+abs(c-b)\n if ((abs(c-a[i])+abs(b-c))<out):\n out=abs(c-a[i])+abs(b-c)\nprint(out)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s064759396', 's397995040', 's473921099'] | [3064.0, 3188.0, 3064.0] | [18.0, 19.0, 17.0] | [311, 298, 365] |
p03292 | u576504675 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['# coding:utf-8\n\na = list(map(int, input().split()))\na.sort()\nprint(a)\n\nnum = 0\nfor i in range(len(a)-1):\n num += a[i+1] - a[i]\n\nprint(num)\n', '# coding:utf-8\n\na = list(map(int, input().split()))\na.sort()\n\nnum = 0\nfor i in range(len(a)-1):\n num += a[i+1] - a[i]\n\nprint(num)\n'] | ['Wrong Answer', 'Accepted'] | ['s332881970', 's283606877'] | [2940.0, 2940.0] | [17.0, 17.0] | [142, 133] |
p03292 | u576844664 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["nums = map(int, input().split(' '))\nnums.sort()\nmap(-nums[0], nums)\nprint(nums[2] - nums[1])", "nums = list(map(int, input().split(' ')))\nnums.sort()\nbuf = nums[0]\nnums = list(map(lambda x: x - buf, nums))\nprint(nums[2])\n"] | ['Runtime Error', 'Accepted'] | ['s123007204', 's289370636'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 125] |
p03292 | u580404776 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A=sorted(list(map(int,input())))\nprint(A[2]-A[0])', 'A=sorted(list(map(int,input().split())))\nprint(A[2]-A[0])'] | ['Runtime Error', 'Accepted'] | ['s742363169', 's547384262'] | [2940.0, 2940.0] | [19.0, 17.0] | [49, 57] |
p03292 | u585742242 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['# -*- coding: utf-8 -*-\nimport sys\nn, m = map(int, input().split())\ndemands = [\n tuple(map(int,\n line.strip().split())) for line in sys.stdin.readlines()\n]\ndemands.sort(key=lambda demand: demand[1])\n\nbridge = -1\ncnt = 0\nfor ai, bi in demands:\n\n if ai <= bridge:\n continue\n\n else:\n bridge = bi - 1\n cnt += 1\n\nprint(cnt)\n', "# -*- coding: utf-8 -*-\nfrom itertools import permutations\n\nary = map(int, input().split())\n\nmin_val = float('inf')\nfor vals in permutations(ary):\n tmp_val = 0\n for i, val in enumerate(vals):\n if i > 0:\n tmp_val += abs(val - vals[i - 1])\n\n if min_val > tmp_val:\n min_val = tmp_val\n\nprint(min_val)\n"] | ['Runtime Error', 'Accepted'] | ['s062506629', 's519219677'] | [3188.0, 3060.0] | [18.0, 17.0] | [362, 331] |
p03292 | u587328420 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['import math\nimport functools\n\n\ndef lcm_base(x, y):\n return (x * y) // math.gcd(x, y)\n\ndef lcm_list(numbers):\n return functools.reduce(lcm_base, numbers, 1)\n\ndef lcm_list(*numbers):\n return functools.reduce(lcm_base, numbers, 1)\n\ndef main() :\n n = int(input())\n a = list(map(int, input().split()))\n lcm = lcm_list(*a)\n\n ans = 0\n for aa in a :\n ans += (lcm-1) % aa\n\n print(ans)\n\nmain()', 'a = list(map(int, input().split()))\na = sorted(a)\nans = 0\nL = len(a)\nfor i in range(1,L) :\n ans += abs(a[i]-a[i-1])\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s789934380', 's535794720'] | [3572.0, 2940.0] | [23.0, 17.0] | [417, 130] |
p03292 | u597017430 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = sorted(list(map(int, input().split())))\nprint(A[0]-A[2])', 'A = sorted(list(map(int, input().split())))\nprint(abs(A[0]-A[2]))\n'] | ['Wrong Answer', 'Accepted'] | ['s393922034', 's156848397'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 66] |
p03292 | u599925824 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['As = input().split()\nprint(max(As)-min(As))', 'As = input().split()\nresult = int(max(As)) - int(min(As))\nprint(-result if result<0 else result)'] | ['Runtime Error', 'Accepted'] | ['s491836249', 's876100280'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 97] |
p03292 | u600261652 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['list = list(map(int(input().split())))\nprint(max(list)-min(list))', 'list = list(map(int, input().split()))\nprint(max(list)-min(list))'] | ['Runtime Error', 'Accepted'] | ['s838695445', 's197301375'] | [2940.0, 2940.0] | [17.0, 19.0] | [65, 65] |
p03292 | u600935366 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\n\nans = 10**5\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if i != j and j != k and i != k:\n cost = abs(a[j] - a[i]) + abs(a[k] - a[j])\n print(cost, i, j, k)\n if ans > cost:\n ans = cost\nprint(ans)', 'a = list(map(int, input().split()))\n\nans = 10**5\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if i != j and j != k and i != k:\n cost = abs(a[j] - a[i]) + abs(a[k] - a[j])\n if ans > cost:\n ans = cost\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s698208847', 's107786606'] | [3060.0, 3064.0] | [18.0, 17.0] | [331, 294] |
p03292 | u607075479 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A=map(int,input().split());print(max(A)-min(A))', 'A=list(map(int,input().split()));print(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s184859380', 's902302022'] | [2940.0, 2940.0] | [17.0, 19.0] | [47, 53] |
p03292 | u607729897 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A=list(map(int,input().split()))\nA.sort()\nfor i in range(len(A)):\n if i==0:\n continue\n else:\n res=res+A[i]-A[i-1]\nprint(res)', 'A=list(map(int,input().split()))\nA.sort()\nfor i in range(len(A)):\n if i==0:\n continue\n else:\n res=A[i]-A[i-1]\nprint(res)', 'A=list(map(int,input().split()))\nA.sort()\nfor i in range(len(A)):\n if i=0:\n continue\n else:\n res=A[i]-A[i-1]\nprint(res)\n', 'A=list(map(int,input().split()))\nA.sort()\nres=0\nfor i in range(len(A)):\n if i==0:\n continue\n else:\n res=res+A[i]-A[i-1]\nprint(res)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s011254817', 's737044660', 's839869678', 's946697147'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [132, 128, 128, 138] |
p03292 | u609814378 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = list(map(int, input().split()))\n\nB = A.sort(reverse=True)\n\nprint(B[0] - B[2])', 'A = list(map(int, input().split()))\n\nA.sort(reverse=True)\n\nprint(A[0]-A[2])'] | ['Runtime Error', 'Accepted'] | ['s734652012', 's869025071'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 75] |
p03292 | u611090896 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['*a = map(int,input().split())\nprint(max(a)-min(a))', '*a, = map(int,input().split())\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s149884752', 's799764096'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 52] |
p03292 | u617225232 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a =list(map(int,input().split()))\nprint(max(a)-min(b))\n', 'a =list(map(int,input().split()))\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s811227463', 's168961751'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 55] |
p03292 | u619458041 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["import sys\n\ndef main():\n input = sys.stdin.readline\n A = list(map(int, input().split()))\n A = sorted(A)\n ans = 0\n for i in range(1, len(A)-1):\n ans += A[i+1] - A[i]\n print(ans)\n\n\nif __name__ == '__main__':\n main()", "import sys\n\ndef main():\n input = sys.stdin.readline\n A = list(map(int, input().split()))\n A = sorted(A)\n ans = 0\n for i in range(len(A)-1):\n ans += A[i+1] - A[i]\n print(ans)\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s708009374', 's211642714'] | [3060.0, 2940.0] | [18.0, 17.0] | [223, 221] |
p03292 | u623349537 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A1, A2, A3 = map(int, input().split())\nprint(min(abs(A1 - A2) + abs(A2 - A3), abs(A1 - A3) + abs(A2 - A3), abs(A2 - A1) + abs(A1 - A3), abs(A2 - A3) + abs(A3 - A1), abs(A3 - A1) + abs(A1 - A2), abs(A3 - A2) + abs(A2 - A1))', 'A1, A2, A3 = map(int, input().split())\nprint(min(abs(A1 - A2) + abs(A2 - A3), abs(A1 - A3) + abs(A2 - A3), abs(A2 - A1) + abs(A1 - A3), abs(A2 - A3) + abs(A3 - A1), abs(A3 - A1) + abs(A1 - A2), abs(A3 - A2) + abs(A2 - A1))\n )'] | ['Runtime Error', 'Accepted'] | ['s712652313', 's958475002'] | [3060.0, 3060.0] | [17.0, 17.0] | [222, 229] |
p03292 | u623687794 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['tsk=list(map(int,input().split()))\ntsk.sort(reverse=True)\nans=0\nfor i in range(2):\n ans+=tsk[i]-tsk[i+1]', 'tsk=list(map(int,input().split()))\nprint(max(tsk)-min(tsk))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s555311060', 's134638151'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 61] |
p03292 | u625729943 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c=map(int,input().split())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\ns1=d+e\ns2=e+f\ns3=f+d\nl=[s1,s2,s3]\nl.sort()\nprint(sum(l[1:]))', 'a,b,c=map(int,input().split())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\ns1=d+e\ns2=e+f\ns3=f+d\nl=[s1,s2,s3]\nl.sort()\nprint(sum(l[:2]))', 'a,b,c=map(int,input().split())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\ns1=d+e\ns2=e+f\ns3=f+d\nl=[s1,s2,s3]\nl.sort()\nprint(l[0])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s606283567', 's966113629', 's726513710'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0] | [124, 124, 119] |
p03292 | u628262476 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['x = map(int, input().split())\nprint(max(x) - min(x))', 'a=list(map(int,split(input())))\nprint(max(a)-min(a))', 'x = list(map(int, input().split()))\nprint(max(x) - min(x))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s506045699', 's957882513', 's582536509'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [52, 52, 58] |
p03292 | u629350026 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a1,a2,a3=map(int,input().split())\nl=[a1,a2,a3]\nl.sort()\nprint(l[2]+l[0])\n', 'a1,a2,a3=map(int,input().split())\nl=[a1,a2,a3]\nl.sort()\nprint(l[2]-l[1]*2+l[0])\n', 'a1,a2,a3=map(int,input().split())\nl=[a1,a2,a3]\nl.sort()\nprint(l[2]-l[0])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s343899565', 's631539260', 's119111716'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [73, 80, 73] |
p03292 | u633105820 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["import unittest\n\nfrom app.ABC103_A import run\n\n\nclass TestSample(unittest.TestCase):\n def test_run(self):\n self.assertEqual(run([1, 6, 3]), 5)\n self.assertEqual(run([11, 5, 5]), 6)\n self.assertEqual(run([100, 100, 100]), 0)\n\n\nif __name__ == '__main__':\n unittest.main()\n", "def run(a):\n return max(a) - min(a)\n\n\ndef read_line():\n a = list(map(int, input().split()))\n return a\n\n\ndef main():\n a = read_line()\n print(run(a))\n\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s555931391', 's332527895'] | [6348.0, 2940.0] | [163.0, 17.0] | [297, 203] |
p03292 | u635252313 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A,B=map(int,input().split())\nprint("Yay!" if A<=8 and B<=8 else ":(")', 'A=list(map(int,input().split()))\nA=sorted(A)\nprint(abs(A[2]-A[0]))'] | ['Runtime Error', 'Accepted'] | ['s001099584', 's367182352'] | [2940.0, 2940.0] | [17.0, 17.0] | [69, 66] |
p03292 | u635339675 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['# x = input()\n# print(x[-1]+x[:-1])\n\n# print(y[-1]+y[:-1])\n\ncount=0\n\ndef check():\n\tcount=0\n\tfor i in range(len(a[0])):\n\t\tif(a[0][i]!=a[1][i]):\n\t\t\tbreak\n\t\tif(i==int(len(a[0])-1)):\n\t\t\tcount=1\n\t\t\tprint("Yes")\n\treturn count\n\n\ndef change():\n\tb=[]\n\tfor i in range(len(a[0])-1):\n\t\tb.append(a[1][i+1])\n\tb.append(a[1][0])\n\n\ta[1]=b\n\n\n\na = []\nfor i in range(2):\n a.append(input())\n\n\n\ncheck()\n\nif(count==0):\n\tfor i in range(len(a[0])-1):\n\t\tchange()\n\t\tcount=check()\n\n\t\tif(count==1):\n\t\t\tbreak\n\nif(count==0):\n\tprint("No")\n', '# x = input()\n# print(x[-1]+x[:-1])\n\n# print(y[-1]+y[:-1])\n\ncount=0\n\ndef check():\n\tcount=0\n\tfor i in range(len(a[0])):\n\t\tif(a[0][i]!=a[1][i]):\n\t\t\tbreak\n\t\tif(i==int(len(a[0])-1)):\n\t\t\tcount=1\n\t\t\tprint("Yes")\n\treturn count\n\n\ndef change():\n\tb=[]\n\tfor i in range(len(a[0])-1):\n\t\tb.append(a[1][i+1])\n\tb.append(a[1][0])\n\n\ta[1]=b\n\n\n\na = []\nfor i in range(2):\n a.append(input())\n\n\n\ncheck()\n\nif(count==0):\n\tfor i in range(len(a[0])-1):\n\t\tchange()\n\t\tcount=check()\n\n\t\tif(count==1):\n\t\t\tbreak\n\nif(count==0):\n\tprint("No")\n', 'x=list(map(int,input().split()))\ny=sorted(x)\nprint(y)\nprint(abs(y[0]-y[1])+abs(y[2]-y[1]))\n#print(int(x[3]-x[2]))\n', 'x=list(map(int,input().split()))\ny=sorted(x)\n#print(y)\nprint(abs(y[0]-y[1])+abs(y[2]-y[1]))\n#print(int(x[3]-x[2]))\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s431388198', 's573243215', 's624145353', 's960770146'] | [3064.0, 3064.0, 2940.0, 2940.0] | [18.0, 19.0, 17.0, 17.0] | [546, 546, 114, 115] |
p03292 | u636775911 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['#coding:utf-8\na=[int(i) for i in input().split()]\ncount=0\nfor i in range(1,2):\n count+=a[i+1]-a[i]\nprint(count)', '#coding:utf-8\na=[int(i) for i in input().split()]\ncount=0\na.sort()\nfor i in range(2):\n count+=abs(a[i+1]-a[i])\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s763925112', 's512093117'] | [3064.0, 3060.0] | [17.0, 20.0] | [112, 124] |
p03292 | u638282348 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['s1 = input()\nprint("Yes" if input() in tuple(s1[i:] + s1[:i] for i in range(len(s1))) else "No")\n', 'import numpy as np\nA = np.array(sorted(map(int, input().split())))\nprint((A[1:] - A[:-1]).sum())\n'] | ['Runtime Error', 'Accepted'] | ['s772178766', 's685805958'] | [2940.0, 12392.0] | [17.0, 148.0] | [97, 97] |
p03292 | u644516473 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = map(int, input().split())\na.sort()\nans = 0\nfor i, j in zip(a, a[1:]):\n ans += abs(j - i)\nprint(ans)', 'a = sorted(map(int, input().split()))\nans = 0\nfor i, j in zip(a, a[1:]):\n ans += abs(j - i)\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s382601290', 's351150558'] | [2940.0, 2940.0] | [17.0, 18.0] | [104, 104] |
p03292 | u647767910 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['task = list(map(int, input().split()))\ncost = 0\nfor i in range(2):\n cost += task[i+1] - task[i]\nprint(cost)', 'task = list(map(int, input().split()))\ntask = sorted(task)\ncost = 0\nfor i in range(2):\n cost += task[i+1] - task[i]\nprint(cost)'] | ['Wrong Answer', 'Accepted'] | ['s015002567', 's821947506'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 128] |
p03292 | u649558044 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['n, m = map(int, input().split())\na, b = [0] * m, [0] * m\nfor i in range(m):\n a[i], b[i] = map(int, input().split())\nbridge = []\nfor i in range(m):\n bridge.append(list(range(a[i], b[i])))\ncnt = 0\n\nwhile True:\n cnt_passed = [0] * (n - 1)\n for bri in bridge:\n for j in bri:\n cnt_passed[j - 1] += 1\n removed = cnt_passed.index(max(cnt_passed)) + 1\n for bri in bridge[:]:\n if removed in bri:\n bridge.remove(bri)\n cnt += 1\n if len(bridge) == 0:\n print(cnt)\n exit(0)', 'a = list(map(int, input().split()))\nprint(max(a) - min(a))'] | ['Runtime Error', 'Accepted'] | ['s125409666', 's498539576'] | [3064.0, 2940.0] | [17.0, 17.0] | [533, 58] |
p03292 | u652569315 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A=list(map(int,input89.split()))\nA.sort()\nprint(A[2]-A[0])\n', 'A=list(map(int,input().split()))\nA.sort()\nprint(A[2]-A[0])\n'] | ['Runtime Error', 'Accepted'] | ['s036544053', 's752898726'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 59] |
p03292 | u652656291 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['L = list[map(int,input().split())]\nM = L.sort()\nprint(L[2]-L[0])', 'l=sorted(map(int,input().split()))\nprint(l[-1]-l[0])\n'] | ['Runtime Error', 'Accepted'] | ['s657985003', 's395883032'] | [2940.0, 2940.0] | [17.0, 17.0] | [64, 53] |
p03292 | u657818166 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | [' a=list(map(int,input().split()))\n print(max(a)-min(a))\n \n', 'a=list(map(int,input().split()))\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s191380041', 's968957288'] | [2940.0, 2940.0] | [17.0, 17.0] | [68, 53] |
p03292 | u657901243 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['n = int(input())\na = [int(i) for i in input().split()]\nprint(max(a)-min(a))\n', 'a = [int(i) for i in input().split()]\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s779962929', 's456610072'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 59] |
p03292 | u657913472 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a=map(int,input().split());\nprint(max(a)-min(a))', 'a=list(map(int,input().split()));print(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s996496945', 's798919072'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 53] |
p03292 | u661980786 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a1,a2,a3 = map(int,input().split())\nif abs(a1-a2) < abs(a1-a3):\n print(abs(a2-a1)+abs(a3-a2))\nelse:\n print(abs(a3-a1)+abs(a1-a2))', 'a = list(map(int,input().split()))\na.sort()[2]\nprint(a[2]-a[0])\n', 'a = list(map(int,input().split()))\na.sort()\nprint(a[2]-a[0])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s181089396', 's264939665', 's850899655'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [135, 64, 60] |
p03292 | u663014688 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["S = input()\nT = input()\n\nfor i in range(len(S)-1):\n x = S[-1]\n S = list(S)\n S.pop(-1)\n S.insert(0,x)\n S = ''.join(S)\n if S == T:\n print('Yes')\n exit()\n\nprint('No')", "S = input()\nT = input()\n\nfor i in range(len(S)-1):\n if S == T:\n print('Yes')\n exit()\n x = S[-1]\n S = list(S)\n S.pop(-1)\n S.insert(0,x)\n S = ''.join(S)\n\n\nprint('No')", 'A,B,C = map(int, input().split())\nnum_list = [A,B,C]\nnum_sorted_list = sorted(num_list)\nprint(num_sorted_list[1]-num_sorted_list[0] + num_sorted_list[2]-num_sorted_list[1])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s265895932', 's346541891', 's377818398'] | [3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [195, 196, 173] |
p03292 | u664796535 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["str1 = input()\nstr2 = input()\n\nif str1 == str2:\n print('Yes')\n\nfor i in range(len(str1) - 1):\n\n str1 = str1[-1] + str1[:-1]\n\n if str1 == str2:\n print('Yes')\n break\n\nif str1 != str2:\n print('No')", "str1 = input()\nstr2 = input()\n\nif str1 == str2:\n print('Yes')\n\nfor i in range(len(str1) - 1):\n \n str1 = str1[-1] + str1[:-1]\n \n if str1 == str2:\n print('Yes')\n\nprint('No')", 'n = int(input())\n\narr = [int(a) for a in input().split()]\n\nmax_mod = 0\nfor i in range(1, max(arr)):\n\n cur_mod = 0\n for a in arr:\n cur_mod += i % a\n\n max_mod = max(max_mod, cur_mod)\n\nprint(max_mod)\n\n', 'tasks = input()\n\ntasks = [int(t) for t in tasks.split()]\n\n# 0, 1, 2\ncost0 = abs(tasks[1] - tasks[0]) + abs(tasks[2] - tasks[1])\n\n# 0, 2, 1\ncost1 = abs(tasks[2] - tasks[0]) + abs(tasks[2] - tasks[1])\n\n# 1, 0, 2\ncost2 = abs(tasks[1] - tasks[0]) + abs(tasks[2] - tasks[0])\n\n# 1, 2, 0\ncost3 = abs(tasks[1] - tasks[2]) + abs(tasks[2] - tasks[0])\n\n# 2, 0, 1\ncost4 = abs(tasks[2] - tasks[0]) + abs(tasks[0] - tasks[1])\n\n# 2, 1, 0\ncost5 = abs(tasks[2] - tasks[1]) + abs(tasks[0] - tasks[1])\n\nmin_cost = min([cost0, cost1, cost2, cost3, cost4, cost5])\n\nprint(min_cost)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s361682208', 's746577432', 's782478709', 's568204080'] | [2940.0, 2940.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0, 19.0] | [220, 193, 214, 560] |
p03292 | u667024514 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c = map(int,input().split())\nans = abs(b-a) + abs(c-b)\nans = min(ans,b + abs(c-b))\nans = min(ans,a + c)\nans = min(ans,abs(b-a) + b)\nprint(ans)', 'lis = list(map(int,input().split()))\nprint(max(lis) - min(lis))'] | ['Wrong Answer', 'Accepted'] | ['s718699316', 's678935308'] | [3060.0, 2940.0] | [17.0, 17.0] | [146, 63] |
p03292 | u668503853 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c=map(int,input().split())\nabc = sorted(list(n))\nprint(max(abc) - min(abc))', 'a,b,c=map(int,input().split())\nprint(max(a,b,c) - min(a,b,c))'] | ['Runtime Error', 'Accepted'] | ['s668942592', 's617436734'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 61] |
p03292 | u673163345 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['*a=map(int,input().split())\nprint(max(a)-min(a))', '*a,=map(int,input().split())\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s017423945', 's521510276'] | [2940.0, 2940.0] | [24.0, 17.0] | [48, 49] |
p03292 | u674959030 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A1,A2,A3=map(int,input().split())\nprint(A3-A1)', 'A=list(map(int,input().split()))\nprint(max(A)-min(A))'] | ['Wrong Answer', 'Accepted'] | ['s613507925', 's142982568'] | [2940.0, 2940.0] | [17.0, 17.0] | [46, 53] |
p03292 | u676496404 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['n = input().split(" ")\n\na = sorted([int(n[1]),int(n[0]),int(n[2])])\n\nprint(a[2]-a[1])', 'n = input().split(" ")\n\na = abs((int(n[1])-int(n[0]))+abs((int(n[2])-int(n[1]))\nb = abs((int(n[2])-int(n[0]))+abs((int(n[1])-int(n[2]))\nc = abs((int(n[2])-int(n[1]))+abs((int(n[0])-int(n[2]))\nd = abs((int(n[0])-int(n[1]))+abs((int(n[2])-int(n[0]))\ne = abs((int(n[1])-int(n[2]))+abs((int(n[0])-int(n[1]))\nf = abs((int(n[0])-int(n[2]))+abs((int(n[1])-int(n[0]))\n\nw = min(a,b,c,d,e,f)\n\nprint(w)', 'n = input().split(" ")\na = sorted([int(n[1]),int(n[0]),int(n[2])])\n\nprint(a[1]-a[0])', 'n = list(map(int,input().split()))\nn.sort()\nans = n[2]-n[0]\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s022806452', 's432818274', 's947872480', 's930181940'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0, 26.0] | [85, 391, 84, 70] |
p03292 | u682730715 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\na.sort()\nt = a[0]\ncount = 0\nfor i in range(1,2):\n count += abs(a[i] - t)\n t = a[i]\nprint(count)', 'a = list(map(int, input().split()))\na.sort()\nprint(a[-1] - a[0])'] | ['Wrong Answer', 'Accepted'] | ['s310215683', 's215037329'] | [2940.0, 2940.0] | [17.0, 18.0] | [133, 64] |
p03292 | u686036872 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['c= list(map(int, input().split()))\nprint(max(list)-min(list))', 'list=list(map(int, input().split()))\nlist.sort()\nprint(list[2]-list[0])'] | ['Runtime Error', 'Accepted'] | ['s855019188', 's244725072'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 71] |
p03292 | u691018832 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a_1, a_2, a_3 = map(int, input().split())\na = [a_1, a_2, a_3]\n\nad = sorted(a, reverse=True)\nans = (ad[0]-ad[1] + (ad[1]-ad[2])\nprint(ans)', 'a_1, a_2, a_3 = map(int, input().split())\n\nmaxs = max(a_1, a_2, a_3)\nmins = min(a_1, a_2, a_3)\nans = maxs-mins\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s757337824', 's803173637'] | [2940.0, 2940.0] | [17.0, 17.0] | [137, 121] |
p03292 | u692690314 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['A = map(int, input().split())\nprint(max(A) - min(A))', 'A = map(int, input().split())\nprint(max(A) min(A))', 'A = list(map(int, input().split()))\nprint(max(A) - min(A))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s567533381', 's605901049', 's577668809'] | [9052.0, 8912.0, 9164.0] | [26.0, 21.0, 25.0] | [52, 50, 58] |
p03292 | u695644361 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['tasks = sorted(map(int, input().split()))\ncost = sum([tasks[i+1] - tasks[i] for i in range(1, len(tasks) - 1)])\nprint(cost)\n', 'tasks = sorted(map(int, input().split()))\ncost = sum([tasks[i+1] - tasks[i] for i in range(0, len(tasks) - 1)])\nprint(cost)\n'] | ['Wrong Answer', 'Accepted'] | ['s037489728', 's833342132'] | [2940.0, 2940.0] | [17.0, 17.0] | [124, 124] |
p03292 | u702208001 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = map(int, input().split())\nprint(max(a) - min(a))a = [int(i) for i in input().split()]\nprint(max(a) - min(a))', '*a = map(int, input().split())\nprint(max(a) - min(a))', 'a = map(int, input().split())\nprint(max(a) - min(a))', '*a = map(int, input().split())\nprint(max(a) - min(a))\n', 'a = [int(i) for i in input().split()]\nprint(max(a) - min(a))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s070938026', 's162901612', 's171570043', 's292492907', 's691128163'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [112, 53, 52, 54, 60] |
p03292 | u711539583 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\nprint(abs(a[0]-a[1])+abs(a[1]-a[2]))\n', 'a = list(map(int, input().split()))\nprint(min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])))\n', 'a = list(map(int, input().split()))\nprint(min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])), abs(a[0]-a[2])+abs(a[1]-a[2])))\n', 'a = list(map(int, input().split()))\nmin(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]))\n', 'a = list(map(int, input().split()))\nprint(min([abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])), abs(a[0]-a[2])+abs(a[1]-a[2])]))\n', 'a = list(map(int, input().split()))\nprint(\n min(\n [abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]), abs(a[0]-a[2])+abs(a[1]-a[2])]\n )\n)\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s263503339', 's316300751', 's488300185', 's529346565', 's663771292', 's130033377'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 19.0, 17.0, 17.0] | [73, 109, 141, 102, 143, 158] |
p03292 | u723583932 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['#abc103 b\ns=input()\nt=input()\nflag=False\nfor i in range(len(s)):\n new_t=t[-1]\n new_t+=t[:-1]\n if new_t==s:\n flag=True\n break\n t=new_t\n\nprint("Yes" if flag else "No" )\n ', '#abc103 a\na=list(map(int,input().split()))\na.sort()\nans=abs(a[0]-a[1])+abs(a[1]-a[2])\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s987037214', 's784373030'] | [2940.0, 2940.0] | [17.0, 17.0] | [197, 97] |
p03292 | u725406838 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['N, K, L = input().split()\nS=int(N)-int(K)\nS=abs(S)\nI=int(L)-int(K)\nI=abs(I)\nprint(S+I)\n', 'N, K, L = input().split()\nS=int(N)-int(K)\nS=abs(S)\nI=int(L)-int(K)\nI=abs(I)\nM=int(N)-int(L)\nM=abs(M)\nlist=(S, I ,M)\nprint(S+I+M-max(list))\n'] | ['Wrong Answer', 'Accepted'] | ['s602610608', 's709925444'] | [2940.0, 3060.0] | [17.0, 17.0] | [87, 139] |
p03292 | u728498511 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\na.sort\nans = (a[2]-a[1])+(a[1]-a[0])\nprint(ans)', 'a = list(map(int, input().split()))\na.sort()\n#print(a)\nans = (a[2]-a[1])+(a[1]-a[0])\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s904135188', 's164672519'] | [3064.0, 2940.0] | [18.0, 17.0] | [83, 96] |
p03292 | u729119068 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c=sorted(map(int, input().split()))\nprint(a+c)', 'a,b,c=sorted(map(int, input().split())\nprint(a+c)', 'a,b,c=sorted(map(int, input().split())\nprint(a-2*b+c)', 'a,b,c=sorted(map(int, input().split()))\nprint(c-a)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s089753956', 's675533687', 's796545732', 's951237766'] | [8960.0, 9040.0, 9012.0, 8888.0] | [28.0, 24.0, 24.0, 27.0] | [50, 49, 53, 50] |
p03292 | u732870425 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['li = list(map(int, input().split()))\nli.sort()\nprint(li[0]-li[2])', 'li = list(map(int, input().split()))\nli.sort()\nprint(li[2]-li[0])'] | ['Wrong Answer', 'Accepted'] | ['s244987909', 's539685329'] | [2940.0, 2940.0] | [18.0, 18.0] | [65, 65] |
p03292 | u733774002 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["s = input()\nt = input()\nfor _ in range(len(s)):\n if s == t:\n print('Yes')\n break\n s = s[-1] + s[:-1]\nelse:\n print('No')", 'A = sorted(map(int, input().split()))\nprint(A[2] - A[0])'] | ['Runtime Error', 'Accepted'] | ['s132190035', 's291417101'] | [2940.0, 2940.0] | [17.0, 17.0] | [142, 56] |
p03292 | u739843002 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['tmp = list(map(lambda n : int(n), input().split(" ")))\ntmp.sort(reverse=True)\n\nprint(tmp[2] - tmp[0])', 'tmp = list(map(lambda n : int(n), input().split(" ")))\ntmp.sort(reverse=True)\n \nprint(tmp[0] - tmp[2])'] | ['Wrong Answer', 'Accepted'] | ['s672484338', 's852390156'] | [8932.0, 9148.0] | [27.0, 29.0] | [101, 102] |
p03292 | u748311048 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['L=list(map(int, input().split()))\nX=sorted([abs(L[3]-L[1]),abs(L[1]-L[2]),abs(L[2]-L[3])])\nprint(X[0]+X[1])', 'L=list(map(int, input().split()))\nX=sorted([abs(L[2]-L[0]),abs(L[0]-L[1]),abs(L[1]-L[2])])\nprint(X[0]+X[1])'] | ['Runtime Error', 'Accepted'] | ['s132482990', 's156017552'] | [2940.0, 3060.0] | [17.0, 18.0] | [107, 107] |
p03292 | u752522099 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['lis = list(map(int,input().split()))\na,b,c = sorted(lis,reverse = True)\nprint(abs(b-a)+(c-b))', 'lis = list(map(int,input().split()))\nprint(max(lis)-min(lis))\n'] | ['Wrong Answer', 'Accepted'] | ['s997256991', 's805474282'] | [2940.0, 3316.0] | [17.0, 21.0] | [93, 62] |
p03292 | u752700460 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\n\ncost = []\ncost.append(a[0]-0)\ncost.append(abs(a[1]-a[0]))\ncost.append(abs(a[2]-a[1]))\n\nprint(sum(cost)-max(cost))', 'a = list(map(int, input().split()))\nprint(max(a)-min(a))'] | ['Wrong Answer', 'Accepted'] | ['s389853968', 's997932743'] | [2940.0, 2940.0] | [17.0, 18.0] | [150, 56] |
p03292 | u756696693 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['*a=map(int,input().split())\nprint(max(a)-min(a))', '*a,=map(int,input().split())\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s261283677', 's287681472'] | [2940.0, 2940.0] | [18.0, 17.0] | [48, 49] |
p03292 | u757274384 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c = map(int, input().split())\n\nL = [a,b,c]\nL.sorted()\n\nprint(abs(L[2]-L[0]))', 'a,b,c = map(int, input().split())\n\nprint(abs(max(a,b,c) - min(a,b,c)))'] | ['Runtime Error', 'Accepted'] | ['s126715731', 's455490972'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 70] |
p03292 | u759412327 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int,input().split()))\nb = sorted(a)\nprint(a[2]-a[0])', 'A = list(map(int,input().split()))\nprint(max(A)-min(A))'] | ['Wrong Answer', 'Accepted'] | ['s572974672', 's992946610'] | [2940.0, 9148.0] | [17.0, 29.0] | [65, 55] |
p03292 | u759718348 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ["S = input()\nT = input()\nX = 0\nfor i in range(len(S)):\n S = S[-1] + S[:-1] \n print(S)\n if S == T:\n X = 1\n\nif X == 0:\n print('No')\nelif X == 1:\n print('Yes')", '*a,= map(int, input().split( ))\nprint(max(*a)-min(*a))'] | ['Runtime Error', 'Accepted'] | ['s331052140', 's100979665'] | [3060.0, 2940.0] | [18.0, 17.0] | [163, 54] |
p03292 | u762420987 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a_1,a_2,a_3 = map(int,input().split())\nif a_1 > a_2:\n if a_1 > a_3:\n print(abs(a_2-a_3))\n elif a_1 == a_3:\n print(0)\n else:\n print(abs(a_1-a_2))\nelif a_1 < a_2:\n if a_1 > a_3:\n print(abs(a_1-a_3))\n elif a_1 == a_3:\n print(0)\n else:\n if a_2 > a_3:\n print(abs(a_1-a_3))\n else:\n print(abs(a_1-a_3))\n \n', 'list = list(map(int,input().split()))\nlist.sort()\nnum1 = abs(list[1]-list[0])\nnum2 = abs(list[2]-list[1])\nprint(num1+num2)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s628869050', 's425803800'] | [3060.0, 2940.0] | [18.0, 17.0] | [398, 124] |
p03292 | u762540523 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a-sorted(list(map(int,input().split())))\nprint(a[-1]-a[0])', 'a=sorted(list(map(int,input().split())))\nprint(a[-1]-a[0])'] | ['Runtime Error', 'Accepted'] | ['s450111604', 's879626855'] | [2940.0, 2940.0] | [18.0, 17.0] | [58, 58] |
p03292 | u767664985 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = list(map(int, input().split()))\nprint(a[2] - a[0])\n', 'a = sorted(list(map(int, input().split())))[:: 1]\nprint(a[2] - a[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s767530981', 's296091808'] | [2940.0, 2940.0] | [17.0, 19.0] | [55, 69] |
p03292 | u768993705 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['s = input()\nt = input()\n\nprint("Yes" if t in s*2 else "No")', 'a = sorted(list(map(int, input().split())))\nprint(a[2]-a[0])'] | ['Runtime Error', 'Accepted'] | ['s497732283', 's572115620'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 60] |
p03292 | u771532493 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['L=[int(i) for i in input().split()]\nS=[L[1]+abs(L[2]-L[1]),L[2]+abs(L[2]-L[1]),L[2]+abs(L[2]-L[0]),L[0]+abs(L[2]-L[0]),L[0]+abs(L[0]-L[1]),L[1]+abs(L[0]-L[1])]\nprint(min(S))', 'N=int(input())\nimport fractions \nprint(2*N//fractions.gcd(2,N))', 'L=[int(i) for i in input().split()]\nA=abs(L[0]-L[1])\nB=abs(L[1]-L[2])\nC=abs(L[2]-L[0])\nS=[A+B,A+C,B+C]\nprint(min(S))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s271030294', 's331365307', 's006987569'] | [3064.0, 2940.0, 3060.0] | [18.0, 18.0, 18.0] | [173, 63, 116] |
p03292 | u773686010 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['N_List = sorted(list(map(int,input().split())))\nprint(sum(N_List[1:]-N_List[:-1]))', 'import numpy as np\nN_List = np.array([map(int,input().split())])\nN_List_a = np.sort(N_List)\nprint(sum(N_List_a[1:]-N_List[:-1]))', 'import numpy as np\nN_List = np.array(list(map(int,input().split())))\nN_List_a = np.sort(N_List)\nprint(sum(N_List_a[1:]-N_List_a[:-1]))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s411158367', 's639262438', 's061179925'] | [9100.0, 27128.0, 27232.0] | [29.0, 113.0, 117.0] | [82, 128, 134] |
p03292 | u776871252 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a, b, c = map(int, input().split())\n\nif abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):\n print(abs(a - b) + abs(b - c))\nelif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c)\n print(abs(a - c) + abs(b - c)\nelse:\n print(abs(a - c) + abs(a - b))\n', 'a, b, c = map(int, input().split())\n\nif abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):\n print(abs(a - b) + abs(b - c))\nelif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):\n print(abs(a - c) + abs(c - b)\nelif abs(b - c) < abs(a - b) and abs(b - c) < abs(a - c):\n print(abs(b - c) + abs(c - a))\n', 'a, b, c = map(int, input().split())\n\nif abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):\n print(abs(a - b) + abs(b - c))\nelif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):\n print(abs(a - c) + abs(b - c)\nelse:\n print(abs(a - c) + abs(a - b))\n', 'a, b, c = map(int, input().split())\n\nif abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):\n print(abs(a - b) + abs(b - c))\nelif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):\n print(abs(a - b) + abs(b - c)\nelse:\n print(abs(b - c) + abs(c - a))\n', 'a, b, c = map(int, input().split())\n\nif b < c:\n tmp = b\n b = c\n c = tmp\nif a < b:\n tmp = a\n a = b\n b = a\n\nif abs(a - c) < abs(a - b):\n print(abs(a - c) + abs(c - b))\nelif abs(a - c) > abs(a - b):\n print(abs(a - b) + abs(b - c))\n', 'a = list(map(int, input().split()))\n\na.sort()\n\nprint(a[2]-a[0])\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s109180701', 's159085747', 's286508856', 's662395908', 's838660623', 's742500331'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 19.0] | [260, 313, 261, 261, 252, 64] |
p03292 | u778814286 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a = sorted([int(input()) for _ in range(3)])\n\nprint(abs(a[0] - a[1]) + abs(a[1] - a[2]))', 'a = map(int,input().split())\n\nprint(abs(a[0] - a[1]) + abs(a[1] - a[2]))\n', 'a = sorted(map(int,input().split()))\n\nprint(abs(a[0] - a[1]) + abs(a[1] - a[2]))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s184074854', 's332320455', 's072250070'] | [3056.0, 3060.0, 2940.0] | [18.0, 19.0, 21.0] | [88, 73, 81] |
p03292 | u780913793 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['import sys\n\nargs = sys.argv\nl = []\n\nfor i in range(0,3):\n l.append(int(args[i+1]))\nl.sort()\nprint(abs(l[0]-l[1]) + abs(l[1]-l[2]))', 'a = list(int(i) for i in input().split())\na.sort()\nprint(abs(a[0]-a[1]) + abs(a[1]-a[2]))'] | ['Runtime Error', 'Accepted'] | ['s249209350', 's390382481'] | [2940.0, 2940.0] | [17.0, 17.0] | [133, 89] |
p03292 | u785505707 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['headData = [int(n) for n in input().split()]\nislandNum = headData[0]\nrequestNum = headData[1]\nrequestList = []\ncount = 0\nfor n in range(requestNum):\n request = [int(elem) for elem in input().split()]\n requestList.append(request)\n\n\nwhile (len(requestList) != 0):\n print(count)\n \n bridgePriority = islandNum * [0]\n for request in requestList:\n for j in range(request[0], request[1]):\n bridgePriority[j] += 1\n deleteBridgeList = []\n\n print(max(bridgePriority))\n \n for index in range(len(bridgePriority)):\n if (bridgePriority[index] == max(bridgePriority)):\n deleteBridgeList.append(index)\n\n print(deleteBridgeList)\n \n newRequestList = []\n for request in requestList:\n for bridge in deleteBridgeList:\n isUnsolvedBridge = True\n if (request[0]<=bridge and bridge<request[1]):\n isUnsolvedBridge=False\n break\n if isUnsolvedBridge:\n newRequestList.append(request)\n requestList = newRequestList\n print(requestList)\n count += len(deleteBridgeList)\n\nprint(count)', 'data = [int(n) for n in input().split()]\nprint(max(data)-min(data))'] | ['Runtime Error', 'Accepted'] | ['s519536937', 's159615241'] | [3064.0, 2940.0] | [19.0, 17.0] | [1255, 67] |
p03292 | u796044734 | 2,000 | 1,048,576 | You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task. | ['a,b,c = map(int,input().split())\n\na = abs(a-b),b = abs(b-c),c = abs(c-a)\n\nprint(a+b+c-max(a,b,c))', 'a,b,c = map(int,input().split())\n\nprint(max(a,b,c)-min(a,b,c))\n'] | ['Runtime Error', 'Accepted'] | ['s267788944', 's277645403'] | [2940.0, 2940.0] | [18.0, 19.0] | [97, 63] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.