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 | u199295501 | 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\nAn = list(map(int, input().split()))\n\nAn.sort()\n\nprint(An)\n\ni = 0\nAi = An[0]\nsum = 0\nfor j,Aj in enumerate(An):\n i = Aj - Ai\n sum += i\n Ai = Aj\n\nprint(sum)\n', '# -*- coding: utf-8 -*-\n\nAn = list(map(int, input().split()))\n\nAn.sort()\ni = 0\nAi = An[0]\nsum = 0\nfor j,Aj in enumerate(An):\n i = Aj - Ai\n sum += i\n Ai = Aj\n\nprint(sum)\n'] | ['Wrong Answer', 'Accepted'] | ['s736430991', 's166069903'] | [2940.0, 2940.0] | [18.0, 18.0] | [190, 178] |
p03292 | u212941574 | 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\nn = input()\nlist = n.split(" ")\nmax = 0;\nmin = 0;\nfor x in list:\n x = int(x)\n if x > max:\n max = x\n elif x < min:\n min = x\n \nprint(max - min)', '# coding: utf-8\nn = input()\nlist = n.split(" ")\nnum = [int(x) for x in list ]\n\nprint(num.max - num.min)\n ', '# coding: utf-8\nn = input()\nlist = n.split(" ")\nnum = [int(x) for x in list ]\n\nprint(max(num)-min(num))\n '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s376161567', 's531180760', 's938553371'] | [2940.0, 3060.0, 3060.0] | [19.0, 19.0, 19.0] | [183, 108, 108] |
p03292 | u213854484 | 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(A))', 'A = list(map(int, input().split()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s972906408', 's659889367'] | [2940.0, 2940.0] | [18.0, 18.0] | [58, 56] |
p03292 | u214434454 | 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(a3 - a1)))', 'a = list(map(int,input().split()))\nprint(max(a) - min(a))'] | ['Wrong Answer', 'Accepted'] | ['s646620229', 's987790100'] | [2940.0, 2940.0] | [17.0, 18.0] | [90, 57] |
p03292 | u217940964 | 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. | ['#!/usr/bin/env python3\nimport sys\n\n\ndef solve(A: "List[int]"):\n print(abs(A[0] - A[1] + abs(A[1] - A[2]))\n return\n\n\n# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = [ int(next(tokens)) for _ in range(3) ] # type: "List[int]"\n solve(A)\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/env python3\nimport sys\n \n \ndef solve(A: "List[int]"):\n print(abs(A[0] - A[1]) + abs(A[1] - A[2]))\n return\n \n \n# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = [ int(next(tokens)) for _ in range(3) ] # type: "List[int]"\n solve(A)\n \nif __name__ == \'__main__\':\n main()', '#!/usr/bin/env python3\nimport sys\n\n\ndef solve(A: "List[int]"):\n print(max(A) - min(A))\n return\n\n\n# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = [ int(next(tokens)) for _ in range(3) ] # type: "List[int]"\n solve(A)\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s649462530', 's896222623', 's523856361'] | [2940.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [573, 578, 554] |
p03292 | u218494572 | 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 = sorted(a)\nprint(abs(a[3] - a[1]))', 'a = list(map(int, input().split()))\na = sorted(a)\nprint(abs(a[2] - a[0]))'] | ['Runtime Error', 'Accepted'] | ['s078081549', 's542136898'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 73] |
p03292 | u227082700 | 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()));a.sort()\nprint(a[2]-a[1]*2-a[0])', 'a=list(map(int,input().split()));a.sort()\nprint(max(a[2]-a[1]*2-a[0],0))', 'a=list(map(int,input().split()));a.sort()\nprint(a[2]-a[0])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s351088137', 's427471133', 's421247673'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [65, 72, 58] |
p03292 | u231685196 | 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\nout = 0\n\nout += abs(b-a)+abs(c-b)\n\nprint(out)', 'l = list(map(int, input().split()))\nl.sort()\nout = 0\n\nout += abs(l[1] - l[0]) + abs(l[2] - l[1])\n\nprint(out)\n'] | ['Wrong Answer', 'Accepted'] | ['s823325357', 's723241916'] | [2940.0, 2940.0] | [17.0, 18.0] | [79, 109] |
p03292 | u235066013 | 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=[int(i) for i in input().split()]\nlist.sort()\nprint(list[2]-list[1])\n', 'list=[int(i) for i in input().split()]\nlist.sort()\nprint(list[2]-list[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s251181339', 's478902229'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 74] |
p03292 | u239375815 | 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 = a[::-1]\ncost = 0\nfor i in range(len(a)-1):\n print(a[i+1],a[i])\n cost += a[i+1]-a[i]\nprint(cost)', 'a = sorted(map(int,input().split()))\na[0]=0\ncost = 0\nfor i in range(len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)', 'a = map(int,input().split())\ncost = 0\nfor i in range(len(a)-1):\n cost += a[i+1]-a[i]\n \nprint(cost)', 'a = sorted(map(int,input().split()))\n\ncost = 0\nfor i in range(1,len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)', 'a = map(int,input().split())\ncost = 0\nfor i in range(len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)', 'a = sorted(map(int,input().split()))\na[0]=0\ncost = 0\nfor i in range(1,len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)', 'a = list(map(int,input().split()))\ncost = 0\nfor i in range(len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)', 'a = list(map(int,input().split()))\na = sorted(a)\ncost = 0\nfor i in range(len(a)-1):\n cost += a[i+1]-a[i]\nprint(cost)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s040905409', 's096228939', 's210523545', 's257647750', 's333602483', 's335068940', 's692163331', 's815531445'] | [3060.0, 3060.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 19.0, 20.0, 17.0, 17.0, 17.0, 17.0, 19.0] | [136, 112, 100, 108, 97, 114, 103, 117] |
p03292 | u240630407 | 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()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s501559299', 's839137755'] | [2940.0, 2940.0] | [18.0, 18.0] | [50, 56] |
p03292 | u243159381 | 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=a.sorted\nprint(b[1]-b[0]+b[2]-b[1])', 'a=list(map(int,input().split()))\nb=sorted(a)\nprint(b[1]-b[0]+b[2]-b[1])'] | ['Runtime Error', 'Accepted'] | ['s210931378', 's246606908'] | [9080.0, 9160.0] | [21.0, 26.0] | [70, 71] |
p03292 | u243572357 | 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 = map(int, input().split())\nprint(max(a) - min(a))', 'a = sorted(list(map(int, input().split())))\nprint(abs(a[0] - a[1]) + abs(a[1] - a[2]))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s194366716', 's211389231', 's855370275', 's304225070'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 21.0, 17.0, 19.0] | [53, 53, 52, 86] |
p03292 | u246639932 | 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()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s866370967', 's195106473'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 56] |
p03292 | u246820565 | 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(0+abs(a[2]-a[1])+abs(a[3]-a[2]))', 'a = list(map(int, input().split()))\na.sort()\nprint(0+abs(a[1]-a[0])+abs(a[2]-a[1]))\n'] | ['Runtime Error', 'Accepted'] | ['s703673972', 's341141543'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 84] |
p03292 | u252210202 | 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 = abs(A[2]+A[1])+abs(A[1]+A[0])\nprint(ans)', 'S = list(input())\nS.sort()\nif S[0] == "a" and S[1] == "b" and S[2] == "c":\n print("Yes")\nelse:\n print("No")', 'A = list(map(int, input().split()))\nA.sort()\nans = abs(A[2]-A[1])+abs(A[1]-A[0])\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s098476882', 's365988601', 's353978132'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [91, 113, 92] |
p03292 | u252404533 | 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)-max(b))', '*a,=map(int,input().split())\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s258477577', 's289188251'] | [2940.0, 2940.0] | [19.0, 17.0] | [48, 49] |
p03292 | u254871849 | 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\n*a = map(int, sys.stdin.readline().split())\n\ndef main():\n return max(a) - min(a)\n\nif __name__ == '__main__':\n ans = main()\n print(ans)", "import sys\n\n*a, = map(int, sys.stdin.readline().split())\na.sort()\n\ndef main():\n print(a[-1] - a[0])\n\nif __name__ == '__main__':\n main()"] | ['Runtime Error', 'Accepted'] | ['s409786616', 's695792017'] | [2940.0, 3060.0] | [17.0, 19.0] | [155, 142] |
p03292 | u259580411 | 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. | ['input_x = str(input())\ninput_y = str(input())\ntmp = input_y\nary = list(input_y)\nmongon = "Yes"\nfor c in input_x:\n idx = tmp.find(c)\n if idx == -1:\n mongon = "No"\n break\n else:\n ary.pop(idx)\n tmp = "".join(ary)\n\n\nprint(mongon)\n', 'input_s = str(input())\nary = input_s.split(" ")\nary.sort()\ntask = 0\ntmp1 = 0\ntmp2 = 0\nfor i in ary:\n if tmp1 == 0:\n tmp1 = int(i)\n else:\n tmp2 = int(i)\n if tmp1 < tmp2:\n task += tmp2 - tmp1\n else:\n task += tmp1 - tmp2\n tmp1 = tmp2\nprint(task)\n'] | ['Runtime Error', 'Accepted'] | ['s890909693', 's274241914'] | [2940.0, 3060.0] | [17.0, 17.0] | [263, 306] |
p03292 | u259979862 | 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 main():\n task_str = input().split()\n print(task_str)\n task_list = []\n task_list = [int(s, 10) for s in task_str]\n task_list.sort()\n print(task_list)\n result = task_list[2] - task_list[0]\n print(result)\n\nif __name__=='__main__':\n main()", "def main():\n task_str = input().split()\n print(task_str)\n task_list = []\n task_list = [int(s, 10) for s in task_str]\n task_list.sort()\n print(task_list)\n result = int(task_list[2]) - int(task_list[0])\n print(result)\n\nif __name__=='__main__':\n main()", "def main():\n task_str = input().split()\n task_list = []\n task_list = [int(s, 10) for s in task_str]\n task_list.sort()\n result = task_list[2] - task_list[0]\n print(result)\n\nif __name__=='__main__':\n main()"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s134805293', 's583379671', 's207781244'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [266, 276, 225] |
p03292 | u266171694 | 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[1] - a[0])', 'a1, a2, a3 = map(int, input().split())\nprint(max(a1, a2, a3) - min(a1, a2, a3))'] | ['Wrong Answer', 'Accepted'] | ['s183292740', 's767846945'] | [2940.0, 2940.0] | [17.0, 17.0] | [63, 79] |
p03292 | u277641173 | 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. | ['p,q,r=map(int,input().split())\nprint(max([abs(p-q)+abs(q-r),abs(q-r)+abs(r-p),abs(p-q)+abs(p-r)]))', 'p,q,r=map(int,input().split())\nprint(min([abs(p-q)+abs(q-r),abs(q-r)+abs(p-r),abs(p-q)+abs(p-r)]))'] | ['Wrong Answer', 'Accepted'] | ['s476065748', 's961811145'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 98] |
p03292 | u277802731 | 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(map(int, input().split()))\n\nif abs(a[0]-a[1])<=abs(a[1]-a[2]):\n b=abs(a[1]-a[2])\nelse:\n b=abs(a[0]-a[1])\nprint(b)\n\n', 'temp = sorted(map(int, input().split()))\na=temp[0]\nb=temp[1]\nc=temp[2]\n\nif a==b==c:\n print(0)\nelif a==b!=c: \n print(abs(a-b))\nelif a!=b==c :\n print(abs(c-a))\nelif a==c!=b:\n print(abs(a-b))\nelif abs(a-b)<=abs(b-c):\n print(abs(b-c))\nelse:\n print(abs(a-b))\n \n', 'temp = sorted(map(int, input().split()))\na=temp[0]\nb=temp[1]\nc=temp[2]\n\nif a==b==c:\n print(0)\nelif a==b!=c: \n print(abs(a-c))\nelif a!=b==c :\n print(abs(c-a))\nelif a==c!=b:\n print(abs(a-b))\nelif abs(a-b)<=abs(b-c):\n print(abs(b-c))\nelse:\n print(abs(a-b))\n \n', '#103a\na=list(map(int,input().split()))\nprint(max(a)-min(a))'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s615675290', 's642673070', 's654555429', 's993580071', 's379009668'] | [2940.0, 2940.0, 3060.0, 3060.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [15, 132, 277, 277, 59] |
p03292 | u280552586 | 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(c-a)\n', 'a, b, c = sorted(map(int, input().split()))\nprint(c-a)\n'] | ['Wrong Answer', 'Accepted'] | ['s716544298', 's994415538'] | [2940.0, 2940.0] | [18.0, 17.0] | [47, 55] |
p03292 | u281876758 | 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))\nprint(min(a))\nans = (int(max(a))) - (int(min(a)))\nprint(ans)\n', 'a = list(map(int, input().split()))\nans = (int(max(a))) - (int(min(a)))\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s677947269', 's755730092'] | [2940.0, 2940.0] | [17.0, 17.0] | [111, 83] |
p03292 | u292846715 | 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 = input(int()).split()\nsort_a = sorted(a)\nans = int(sort_a[-1])-int(sort_a[0])\nprint(ans)', 'a = input(int()).split()\nsort_a = sorted(a)\nans = sort_a[-1]-sort_a[0]', 'a = list(map(int, input().split()))\na.sort()\nans = a[-1]-a[0]\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s862018871', 's994627646', 's331226381'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [91, 70, 72] |
p03292 | u294385082 | 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[2] - a[0])', 'a = list(map(int,input().split()))\nprint(max(a) - min(a))'] | ['Runtime Error', 'Accepted'] | ['s672505644', 's467572177'] | [2940.0, 2940.0] | [17.0, 19.0] | [60, 57] |
p03292 | u296518383 | 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(max(A,B,C)-min(A,B,C)', 'A,B,C=map(int,input().split())\nprint(max(A,B,C)-min(A,B,C))'] | ['Runtime Error', 'Accepted'] | ['s105847107', 's754326138'] | [2940.0, 2940.0] | [17.0, 17.0] | [58, 59] |
p03292 | u298297089 | 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 = "11 5 5"\nlist = list(map(int, input().split()))\n\na = abs(list[1]-list[0])\nb = abs(list[1]-list[2])\nc = abs(list[2]-list[0])\nif (a < b):\n\tif (b < c)\n\t\tprint(a+b)\n\telse :\n\t\tprint(a+c)\nelse :\n\tif (a < c)\n\t\tprint(b+a)\n\telse :\n\t\tprint(b+c)\n', 's = "11 5 5"\nlist = list(map(int, s.split()))\n\na = abs(list[1]-list[0])\nb = abs(list[1]-list[2])\nc = abs(list[2]-list[0])\nif (a < b):\n\tsum = a + b if b < c else c\nelse :\n\tsum = b + c if c < a else a\nprint(sum)\n', 'list = list(map(int, input().split()))\n\nsum = 0\na = abs(list[1]-list[0])\nb = abs(list[1]-list[2])\nc = abs(list[2]-list[0])\nif (a < b):\n\tif(a < c):\n\t\tif(b<c):\n\t\t\tprint(a+b)\n\t\telse :\n\t\t\tprint(a+c)\n\telse :\n\t\tprint(c+a)\nelse :\n\tprint(a+ c if (c < a) else a)', 's = "11 5 5"\nlist = list(map(int, input().split()))\n\na = abs(list[1]-list[0])\nb = abs(list[1]-list[2])\nc = abs(list[2]-list[0])\nl = a+b\nm = b + c\nn = a+c\nif (l < m):\n\tif (l < n)\n\t\tprint(l)\n\telse :\n\t\tprint(n)\nelse :\n\tif (m < n)\n\t\tprint(m)\n\telse :\n\t\tprint(n)\n', 'a = sorted(map(int, input().split()))\nans = 0\ntmp = a[0]\nfor i in a:\n ans += i - tmp\n tmp = i\nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s363392327', 's807884966', 's822705711', 's912047284', 's056447496'] | [2940.0, 3060.0, 3064.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 18.0] | [239, 210, 253, 257, 106] |
p03292 | u301302814 | 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 = sorted(list(map(int, input().split())))\nprint(A[2] - A[1] - A[0])', '# coding: utf-8\nA = sorted(list(map(int, input().split())))\nprint(A[2] - A[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s685063122', 's494475719'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 79] |
p03292 | u304630225 | 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=input().split().sort()\nprint(A)\n', 'A=map(int,input().split())\nA=list(A)\nprint(max(A)-min(A))'] | ['Wrong Answer', 'Accepted'] | ['s653921075', 's555366561'] | [2940.0, 2940.0] | [17.0, 17.0] | [34, 57] |
p03292 | u306142032 | 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 = [i for i in input().split()]\n\nb = sorted(list(set(a)))\nif len(b) == 1:\n print(0)\nelif len(b) == 2:\n print(int(b[0])-int(b[1]))\nelse:\n print(int(b[2]) - int(b[0]))\n\n\nprint(b)\n', 'a = [i for i in input().split()]\n\nb = sorted(map(int, list(set(a))))\n\nif len(b) == 1:\n print(0)\nelif len(b) == 2:\n print(int(b[1])-int(b[0]))\nelse:\n print(int(b[2]) - int(b[0]))\n'] | ['Wrong Answer', 'Accepted'] | ['s387101293', 's037310366'] | [3060.0, 3060.0] | [17.0, 21.0] | [187, 187] |
p03292 | u306950978 | 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(min(abs(a-b)+abs(b-c),abs(b-a)+abs(a-c),abs(a-c)+abs(c-b))', 'a , b , c = map(int,input().split())\nprint(min(abs(a-b)+abs(b-c),abs(b-a)+abs(a-c),abs(a-c)+abs(c-b)))'] | ['Runtime Error', 'Accepted'] | ['s020361584', 's090695127'] | [8952.0, 9132.0] | [22.0, 28.0] | [101, 102] |
p03292 | u314050667 | 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()\ncnt = 1\nfor _ in range(len(s)):\n a = s[len(s)-1]\n b = [s[i] for i in range(len(s)-1)]\n bb = "".join(b)\n s = a+bb\n if s == t:\n cnt *= 0\n\nprint("No") if cnt else print("Yes")', 's = input()\nt = input()\nfor _ in range(len(s)):\n s = s[len(s)-1]+"".join([s[i] for i in range(len(s)-1)])\n if s == t:\n print("Yes")\n exit()\n \nprint("No")', 's = input()\nt = input()\nfor _ in range(len(s)):\n a = s[len(s)-1]\n b = [s[i] for i in range(len(s)-1)]\n bb = "".join(b)\n s = a+bb\n if s == t:\n print("Yes")\n exit()\nprint("No")', 'data = sorted(list(map(int, input().split())))\n\nprint(data[2] - data[0])'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s613683058', 's704800605', 's804754659', 's762775138'] | [3060.0, 3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [218, 180, 203, 72] |
p03292 | u320763652 | 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. | ['lines = map(int, input().split())\nlines.sort()\n\ncnt =0\nfor i in range(len(lines)):\n cnt += lines[2-i]\n\nprint(cnt)\n\n', 'lines = map(int, input().split())\n\n\nlines.sort()\n\ncnt =0\nfor i in range(len(lines)):\n cnt += lines[2-i]\n\nprint(lines[2]-lines[1] + lines[1]-lines[0] )\n\n', 'lines = list(map(int, input().split()))\n\n\nlines.sort()\n\ncnt =0\nfor i in range(len(lines)):\n cnt += lines[2-i]\n\nprint(lines[2]-lines[1] + lines[1]-lines[0] )\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s297803592', 's746529988', 's182404612'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [118, 197, 203] |
p03292 | u325704929 | 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(map(int, input().split()))\n\ncost = 0\nfor i in range(len(A - 1)):\n cost += A[i + 1] - A[i]\n \nprint(cost)\n', 'A = map(int, input().split())\nA = sorted(A)\n\ncost = 0\nfor i in range(len(A - 1)):\n cost += A[i + 1] - A[i]\n \nprint(cost)', 'A = sorted(map(int, input().split()))\n\ncost = 0\nfor i in range(len(A) - 1):\n cost += A[i + 1] - A[i]\n\nprint(cost)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s331384423', 's800713645', 's354440946'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [117, 122, 114] |
p03292 | u326261815 | 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=input()\nlist_n=[int(s) for s in list]\nprint(max(list_n)-min(list_n))', 'list=input()\nlist_n=[int(s) for s in list]\nprint(int(max(list_n))-int(min(list_n)))', 'list=input().split(" ")\nlist_n=[int(s) for s in list]\nprint(int(max(list_n))-int(min(list_n)))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s050586132', 's281424122', 's380284520'] | [9148.0, 9024.0, 9156.0] | [23.0, 28.0, 24.0] | [73, 83, 94] |
p03292 | u328510800 | 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 = sorted([int(x) for x in input().split()])\nprint(min(l[2] - l[1] - l[0], l[2] - (l[1] - l[0])))', 'a = list(map(int, input().split()))\na.sort()\n\nans = 0\nfor i in range(1, len(a)):\n ans += a[i] - a[i - 1]\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s281415113', 's906392951'] | [9152.0, 9140.0] | [27.0, 29.0] | [98, 120] |
p03292 | u328755070 | 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\nanswer = 0\nfor i in range(2):\n answer += A[i + 1] - A[i]\n\nprint(answer)\n', 'A = list(map(int, input().split()))\nA.sort()\nanswer = 0\nfor i in range(2):\n answer += A[i + 1] - A[i]\n\nprint(answer)\n'] | ['Wrong Answer', 'Accepted'] | ['s580502730', 's573295808'] | [2940.0, 2940.0] | [17.0, 18.0] | [118, 120] |
p03292 | u329143273 | 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=int(input())\nprint(max(a,b,c)-min(a,b,c))', 'a,b,c=map(int,input().split())\nprint(max(a,b,c)-min(a,b,c))'] | ['Runtime Error', 'Accepted'] | ['s973553437', 's035977622'] | [2940.0, 2940.0] | [18.0, 17.0] | [47, 59] |
p03292 | u333190709 | 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 fractions\n\nN = int(input())\nA = [int(n) for n in input().split()]\n\ndef lcm(x, y):\n return x * y // fractions.gcd(x, y)\n\nl = 1\nfor a in A:\n l = lcm(a, l)\nB = [(l - 1) % a for a in A]\nprint(sum(B))', 'a = sorted([int(n) for n in input().split()])\nprint(a[2] - a[0])'] | ['Runtime Error', 'Accepted'] | ['s382814644', 's330637488'] | [5052.0, 2940.0] | [37.0, 17.0] | [204, 64] |
p03292 | u333731247 | 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())\n\nprint(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(A1-A2,A2-A3,A3-A1))', 'A1,A2,A3=map(int,input().split())\n\nif abs(A1-A2)==abs(A2-A3):\n print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A1-A2))\nelif abs(A2-A3)==abs(A3-A1):\n print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A2-A3))\nelif abs(A3-A1)==abs(A1-A2):\n print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A3-A1))\nelse :\n print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(A1-A2,A2-A3,A3-A1))', 'A1,A2,A3=map(int,input().split())\n\nprint(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(abs(A1-A2),abs(A2-A3),abs(A3-A1)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s014610331', 's527572608', 's691235129'] | [2940.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0] | [97, 358, 112] |
p03292 | u338107614 | 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\nn = int(input())\na = list(map(int, input().split()))\n\ndef lcm_base(x, y):\n return (x * y) // math.gcd(x, y)\n\ndef lcm_list(numbers):\n a_0 = numbers.pop()\n for i in numbers:\n a_0 = lcm_base(a_0, i)\n return a_0\n\nb = a.copy()\nm = lcm_list(b)-1\nsum = 0\nfor j in a:\n sum += m%j\n\nprint(sum)', 'a = list(map(int, input().split()))\na.sort()\nsub = abs(a[0]-a[1])+abs(a[1]-a[2])\nprint(sub)'] | ['Runtime Error', 'Accepted'] | ['s467632311', 's845658276'] | [3064.0, 2940.0] | [17.0, 18.0] | [317, 91] |
p03292 | u339503988 | 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()))\nl = [[0,1],[1,2],[0,3]\nll = []\nfor i,j in l:\n\tll.append(abs(A[i]-A[j]))\nprint(min(ll))', 'A = list(map(int, input().split()))\nl = [[0,1],[1,2],[0,3]\nll\nfor i,j in l:\n\tll.append(abs(A[i]-A[j]))\nprint(min(ll))', 'A = list(map(int, input().split()))\nl = []\nfor i in range(3):\n\tfor j in range(-3, 0):\n\t\tl.append(abs(A[i]-A[j]))\nprint(min(l))', 'A = list(map(int, input().split()))\nb = [[0, 1], [2, 1], [2, 0]]\nl = 0\nn = []\nfor i, j in b:\n l = l + abs(A[j]-A[i])\n n.append(abs(A[j]-A[i]))\nl = l - max(n)\nprint(l)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s409924073', 's589736246', 's780008188', 's480304957'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [122, 117, 126, 173] |
p03292 | u339922532 | 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 = [map(int, input().split())]\nsli = sorted(li)\n\nprint((sli[1] - sli[0]) + (sli[2] - sli[1]))', 'li = list(map(int, input().split()))\nsli = sorted(li)\n\nprint((sli[1] - sli[0]) + (sli[2] - sli[1]))'] | ['Runtime Error', 'Accepted'] | ['s695188393', 's504719622'] | [2940.0, 2940.0] | [17.0, 22.0] | [95, 99] |
p03292 | u343454379 | 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())\nAB=[list(map(int,input().split())) for _ in range(M)]\nAB.sort()\n\nans=0\nwhile AB:\n a=AB[-1][0]\n AB=list(filter(lambda x:x[1]<=a,AB))\n ans+=1\n \nprint(ans)', 'A=list(map(int,input().split()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s268907769', 's137246686'] | [3060.0, 2940.0] | [17.0, 17.0] | [185, 53] |
p03292 | u350093546 | 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[a])', 'a=list(map(int,input().split()))\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s431546948', 's232728330'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 54] |
p03292 | u350248178 | 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=[int(i) for i in input().split()]\n\na.sort()\nb=[a[2]-a[1],a[1]-a[0],a[2]-a[0]]\n\nprint(b)\n\nprint(sum(b)-max(b))', 'a=[int(i) for i in input().split()]\n\na.sort()\nb=[a[2]-a[1],a[1]-a[0],a[2]-a[0]]\n\nprint(b)\n\nprint(sum(b)-max(b))', 'a=[int(i) for i in input().split()]\n\na.sort()\nb=[a[2]-a[1],a[1]-a[0],a[2]-a[0]]\n\n\nprint(sum(b)-max(b))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s454075800', 's937846196', 's592042606'] | [2940.0, 2940.0, 3060.0] | [18.0, 17.0, 19.0] | [111, 111, 102] |
p03292 | u355661029 | 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))\n', 'a = list(map(int, input().split()))\nprint(max(a) - min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s403760215', 's276460980'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 59] |
p03292 | u362560965 | 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 = [int(i) for i in input().split()]\n\nprint(A(max)-A(min))', 'A = [int(i) for i in input().split()]\n\nprint(max(A)-min(A))'] | ['Runtime Error', 'Accepted'] | ['s768601697', 's182074851'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 59] |
p03292 | u363836311 | 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()\nm=abs(A1-A2)\nn=abs(A2-A3)\nprint(m+n)', 'A=list(map(int, input().split()))\nA.sort()\nm=abs(A[0]-A[1])\nn=abs(A[1]-A[2])\nprint(m+n)'] | ['Runtime Error', 'Accepted'] | ['s321731082', 's880158503'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 87] |
p03292 | u367130284 | 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. | ['input();print(sum(int(a)-1for i in input().split()))', 'n,m=map(int,input().split());x=y=0\nfor(a,b)in sorted([list(map(int,input().split()))for i in range(m)],key=lambda x:x[1]):\n if a>x:\n x=b-1\n y+=1\nprint(y)', 'a,b,c=sorted(map(int,input().split()));print(c-a)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s368883746', 's517401594', 's010049530'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [52, 155, 49] |
p03292 | u371467115 | 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=list(map(int,input())\ns=s.sort()\nprint(s[1]-s[0])\n', 's=list(int(input()))\ns=s.sorted()\nprint(s[1]-s[0])', 's=list(map(int,input().split())\ns.sort()\nprint(s[2]-s[0])\n', 's=list(map(int,input())\ns.sort()\nprint(s[2]-s[0])\n', 's=list(map(int,input().split()))\ns.sort()\nprint(s[2]-s[0])\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s071247645', 's450251156', 's870843244', 's933331279', 's287659016'] | [2940.0, 2940.0, 3064.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 18.0, 17.0] | [52, 50, 58, 50, 59] |
p03292 | u374146618 | 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 = [int(x) for x in input().split()]\nprint(min(a1, a2, a3))', 'a1, a2, a3 = [int(x) for x in input().split()]\nprint(a3-a1)', 'a1, a2, a3 = [int(x) for x in input().split()]\na1, a2, a3 = sorted([a1, a2, a3])\nprint(a3-a1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s288089992', 's721480522', 's639851702'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [69, 59, 93] |
p03292 | u375006224 | 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()))\nprint(max(a)-min(a))', 'a=list(map(int,input().split()))\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s143518015', 's082215026'] | [3064.0, 2940.0] | [17.0, 17.0] | [45, 53] |
p03292 | u375616706 | 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. | ['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nl = list(map(int, input().split()))\nprint(sum(l)-max(l))\n', 'from functools import reduce\nn = (int)(input())\na = (list)(map(int, input().split()))\n\n\ndef calcMod(a, m):\n return sum([m % v for v in a])\n\n\ndef mul(a, b):\n return a*b\n\n\n#print(calcMod(a, reduce(mul, a)-1))\nprint(sum(a)-n)\n', '# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nl = list(map(int, input().split()))\nprint(3*max(l)-sum(l))\n', '# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nl = list(map(int, input().split()))\n\nl = sorted(l, reverse=True)\nprint(sum(a-b for a, b in zip(l, l[1:])))\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s313879413', 's464944471', 's898342031', 's153277344'] | [2940.0, 3572.0, 2940.0, 2940.0] | [17.0, 23.0, 18.0, 18.0] | [156, 225, 158, 206] |
p03292 | u377158682 | 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. | ["\ndef B():\n s1 = input()\n s2 = input()\n \n YES = 'Yes'\n NO = 'No'\n \n result = NO\n for i in range(len(s1)):\n p = s1[i:] + s1[:i]\n if(p in s2):\n result = YES\n \n print(result)\n\nif __name__ =='__main__':\n B()", "def A():\n a = input().split()\n try:\n for x in a:\n x = int(x)\n except:\n exit(1)\n a.sort()\n a.inverse()\n \n a_i = a[0]\n sum = 0\n for x in a[1:]:\n sum += abs(a_i - x)\n a_i = x \n \n print(sum)\n\n\nif __name__ =='__main__':\n A()", "\ndef A():\n s = input().split()\n a = [int(n) for n in s]\n a.sort()\n a.reverse()\n \n a_i = a[0]\n sum = 0\n for x in a[1:]:\n sum += abs(a_i - x)\n a_i = x \n \n print(sum)\n\nif __name__ =='__main__':\n A()"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s547843171', 's684505371', 's560555988'] | [2940.0, 3056.0, 3060.0] | [18.0, 17.0, 17.0] | [260, 294, 242] |
p03292 | u377989038 | 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. | ['from fractions import gcd\n\nn = int(input())\na = list(map(int, input().split()))\n\nlcm = a[0]\nfor i in a:\n lcm = lcm * i // gcd(lcm, i)\nans = 0\nfor i in a:\n ans += (lcm-1) % i\nprint(ans)\n', 'a = list(map(int, input().split()))\na.sort()\nprint(a[2] - a[0])\n'] | ['Runtime Error', 'Accepted'] | ['s950478406', 's429742005'] | [5048.0, 2940.0] | [35.0, 17.0] | [191, 64] |
p03292 | u380284234 | 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 - Task Scheduling Problem\n*a=map(int,input().split())\nprint(max(a)- min(a)', '*a,=map(int,input().split())\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s652515827', 's220093288'] | [2940.0, 3060.0] | [17.0, 19.0] | [78, 49] |
p03292 | u380761558 | 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,raw_input().split())\na.reverse()\nfor i in range(len(a)):\n if i == 0:\n res = 0\n else :\n res += a[i]-a[i-1]\nprint(res)', 'a = map(int,raw_input().split())\na.reverse()\nfor i in range(len(a)):\n if i == 0:\n res = 0\n else :\n res += a[i-1]-a[i]\nprint(res)', 'a = list(map(int, input().split())) \na.reverse()\nfor i in range(len(a)):\n if i == 0:\n res = 0\n else :\n res += a[i-1]-a[i]\nprint(res)', 'a = map(int,raw_input().split())\na.reverse()\nfor i in range(len(a)):\n if == 0:\n res = 0\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 res = 0\n else :\n res += a[i]-a[i-1]\nprint(res)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s093978462', 's243451204', 's336838206', 's869215264', 's711987446'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 18.0, 19.0] | [136, 136, 140, 134, 137] |
p03292 | u380793800 | 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()))\nprint(max(a) - min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s693978858', 's383315043'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 59] |
p03292 | u382423941 | 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. | ['from itertools import permutations\n\na1, a2, a3 = map(int, input().split())\nans = 1e9\nfor a in permutations([a1, a2, a3]):\n print(a)\n tmp = abs(a[0] - a[1]) + abs(a[1] - a[2])\n ans = min(ans, tmp)\nprint(ans)\n', 'from itertools import permutations\n\na1, a2, a3 = map(int, input().split())\nans = 1e9\nfor a in permutations([a1, a2, a3]):\n tmp = abs(a[0] - a[1]) + abs(a[1] - a[2])\n ans = min(ans, tmp)\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s799189538', 's709215810'] | [3060.0, 3188.0] | [18.0, 19.0] | [216, 203] |
p03292 | u382431597 | 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(reverse=True)\nprint(a[2]-a[0])\n', 'a=list(map(int, input().split()))\na.sort()\nprint(a[2]-a[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s874955944', 's656163106'] | [3064.0, 2940.0] | [17.0, 17.0] | [72, 60] |
p03292 | u388697579 | 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. | ['# your code goes here\nimport numpy as np\nl = input().split()\nlnp = np.zeros(len(l))\nfor i in range(len(l)):\n\tlnp[i] = int(l[i])\nlnp = np.sort(lnp)\nprint(lnp[-1]-lnp[0])', '# your code goes here\nimport numpy as np\nl = input().split()\nlnp = np.zeros(len(l))\nfor i in range(len(l)):\n\tlnp[i] = int(l[i])\nlnp = np.sort(lnp)\nprint(int(lnp[-1]-lnp[0]))'] | ['Wrong Answer', 'Accepted'] | ['s233507233', 's168185077'] | [21220.0, 20992.0] | [1555.0, 1420.0] | [168, 173] |
p03292 | u390618988 | 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. | ['from sys import stdin\nimport fractions\n\nN = int(stdin.readline().rstrip())\nA = [int(x) for x in stdin.readline().rstrip().split()]\n\nlcm_a = int(A[0] * A[1] / fractions.gcd(A[0], A[1]))\n\nif len(A) > 2:\n for k in A[2:]:\n lcm_a = int(lcm_a * k / fractions.gcd(lcm_a, k))\n\nmodulo_sum = 0\n\nfor k in A:\n modulo_sum += (lcm_a - 1) % k\n\nprint(modulo_sum)', 'from sys import stdin\n\nA = [int(x) for x in stdin.readline().rstrip().split()]\n\nA.sort()\n\nprint(A[2] - A[0])\n'] | ['Runtime Error', 'Accepted'] | ['s963222404', 's705928091'] | [5048.0, 3060.0] | [36.0, 19.0] | [359, 109] |
p03292 | u390762426 | 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(c-a)', 'a,b,c=sorted(map(int,input().split()))\nprint(c-a)'] | ['Runtime Error', 'Accepted'] | ['s777003261', 's169731644'] | [2940.0, 2940.0] | [17.0, 18.0] | [48, 49] |
p03292 | u390883247 | 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. | ['AList = list(map(int,input().split()))\nAList.sort()\nprint(abs(AList[0]-AList[1])+abs(AList[2]-AList[1])', 'AList = list(map(int,input().split()))\nAList.sort()\nprint(abs(AList[0]-AList[1])+abs(AList[2]-AList[1]))'] | ['Runtime Error', 'Accepted'] | ['s969712092', 's351693922'] | [2940.0, 2940.0] | [17.0, 17.0] | [103, 104] |
p03292 | u397563544 | 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)\nprint(a[2]-a[0])', 'a = list(map(int,input().split()))\na.sort()\nprint(a[2]-a[0])'] | ['Wrong Answer', 'Accepted'] | ['s938253320', 's964770206'] | [2940.0, 2940.0] | [18.0, 18.0] | [69, 60] |
p03292 | u405660020 | 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(a-b)+abs(b-c))', 'lst=list(map(int,input().split()))\nlst.sort()\nprint(abs(lst[0]-lst[1])+abs(lst[1]-lst[2]))'] | ['Wrong Answer', 'Accepted'] | ['s916574880', 's838192212'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 90] |
p03292 | u406767170 | 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 = input().split()\n\nif int(a[0])<=int(a[1]) and int(a[0])<=int(a[2]):\n min = a[0]\n if int(a[1])<=int(a[2]):\n max = int(a[2])\n else:\n max = int(a[1])\nelif int(a[1])<=int(a[2]) and int(a[1])<=int(a[0]):\n min = a[1]\n if int(a[0])<=int(a[2]):\n max = int(a[2])\n ele:\n max = int(a[0])\nelse:\n min = a[2]\n if int(a[0])<=int(a[1]):\n max = int(a[1])\n ele:\n max = int(a[0])\n\nprint(max-min)', 'a = input().split()\n\nif int(a[0])<=int(a[1]) and int(a[0])<=int(a[2]):\n min = int(a[0])\n if int(a[1])<=int(a[2]):\n max = int(a[2])\n else:\n max = int(a[1])\nelif int(a[1])<=int(a[2]) and int(a[1])<=int(a[0]):\n min = int(a[1])\n if int(a[0])<=int(a[2]):\n max = int(a[2])\n else:\n max = int(a[0])\nelse:\n min = int(a[2])\n if int(a[0])<=int(a[1]):\n max = int(a[1])\n else:\n max = int(a[0])\n\nprint(max-min)'] | ['Runtime Error', 'Accepted'] | ['s979516241', 's758745166'] | [3064.0, 3064.0] | [17.0, 17.0] | [406, 423] |
p03292 | u412481017 | 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. | ['r=sorted(map(int,input().split()))[-1]\n\nprint(r[0]-r[2])', 'r=sorted(map(int,input().split()))[::-1]\n\nprint(r[0]-r[2])'] | ['Runtime Error', 'Accepted'] | ['s533762463', 's298198221'] | [2940.0, 2940.0] | [17.0, 18.0] | [56, 58] |
p03292 | u415325136 | 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(i) for i in inpyt().split()]\nn.sort()\nprint(int(n[2]-n[0]))', 'n = [int(i) for i in input().split()]\nn.sort()\nprint(int(n[2]-n[0]))\n'] | ['Runtime Error', 'Accepted'] | ['s239631512', 's858392247'] | [2940.0, 2940.0] | [19.0, 17.0] | [68, 69] |
p03292 | u415905784 | 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()))\nprint(max(A) - min(A))'] | ['Runtime Error', 'Accepted'] | ['s635124931', 's276676382'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 58] |
p03292 | u419963262 | 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().split()\nA=sorted(S)\nprint(S[2]-S[0])\n', 'S=input().split()\nA=sorted(S)\nprint(int(S[2])-int(S[0]))', 'S=list(map(int,input().split()))\nA=sorted(S)\n\nprint(A[2]-A[0])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s727193141', 's971206092', 's082312404'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [47, 56, 62] |
p03292 | u421815567 | 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 = list(map(int, input().split(" ")))\n\nprint(min(abs(a[0]-a[1]), abs(a[1]-a[2])))', 'import math\na = list(map(int, input().split(" ")))\n\n\nmin_ = 99999999999999999\n\nfor i in range(3):\n for j in range(3):\n sum_ = None\n for k in range(3):\n if i != j != k and i != k:\n sum_ = abs(a[i]-a[j]) + abs(a[j]-a[k])\n\n if sum_ is not None:\n\t min_ = min(min_, sum_)\n\nprint(min_)'] | ['Wrong Answer', 'Accepted'] | ['s543172649', 's979322669'] | [3060.0, 3060.0] | [17.0, 17.0] | [94, 336] |
p03292 | u432805419 | 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())\na.sort()\nprint(a[2]-a[0])', 'a =list(map(int,input().split()))\nprint(max(a)-min(a))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s208069591', 's708490974', 's880091988'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [49, 54, 54] |
p03292 | u437215432 | 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\n\nb = list(map(int, input().split()))\ndef task(b):\n return abs(b[1] - b[0]) + abs(b[2] - b[1])\na = np.array(a)\np = np.array([[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]) - 1\nMin = np.inf\nfor i in range(6):\n Min = min(Min, task(a[p[i,:]]))\nprint(Min)\n', '# ABC103A\n\nimport numpy as np\n\n = list(map(int, input().split()))\ndef task(b):\n return abs(b[1] - b[0]) + abs(b[2] - b[1])\na = np.array(a)\np = np.array([[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]) - 1\nMin = np.inf\nfor i in range(6):\n Min = min(Min, task(a[p[i,:]]))\nprint(Min)\n', 'import numpy as np\n\na = list(map(int, input().split()))\ndef task(b):\n return abs(b[1] - b[0]) + abs(b[2] - b[1])\na = np.array(a)\np = np.array([[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]) - 1\nMin = np.inf\nfor i in range(6):\n Min = min(Min, task(a[p[i,:]]))\nprint(Min)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s455879943', 's993993847', 's346902256'] | [12504.0, 2940.0, 12504.0] | [151.0, 18.0, 148.0] | [284, 294, 284] |
p03292 | u437638594 | 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 = sorted(list(map(int, input().split())), reverse=True)\n\ncost = 0\nfor a, b in zip(As[:-1], As[1:]):\n cost = abs(a-b)\n \ncost -= As[0]\nprint(cost)', 'As = sorted(list(map(int, input().split())), reverse=True)\n\ncost = 0\nfor a, b in zip(As[:-1], As[1:]):\n cost += abs(a-b)\n\nprint(cost)'] | ['Wrong Answer', 'Accepted'] | ['s693484835', 's096993922'] | [2940.0, 2940.0] | [17.0, 19.0] | [149, 134] |
p03292 | u440129511 | 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())\nk=[a1,a2,a3]\nprint( abs(max(k)-max(k)[1]) + abs(max(k)[1]-max(k)[2]))', 'k=list(map(int,input().split()))\nprint( abs(max(k)-max(k)[1]) + abs(max(k)[1]-max(k)[2]))', 'a1,a2,a3=map(int,input().split())\nk=sorted[a1,a2,a3]\nprint( abs(k[2]-k[1]) + abs(k[1]-k[2]))', 'k=list(map(int,input().split()))\nk.sort()\nprint( abs(k[2]-k[1]) + abs(k[1]-k[2]))', 'k=list(map(int,input().split()))\nk.sort() \nprint( abs(k[0]-k[1]) + abs(k[1]-k[2]))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s053086737', 's607347347', 's752562741', 's993011693', 's960575066'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 18.0] | [103, 89, 92, 81, 107] |
p03292 | u440495996 | 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 = str(input())\nt = str(input())\n \nif s == t:\n print("Yes")\nelse:\n print("No")\n', 'import math\na = int(input())\nb = int(input())\nc = int(input())\n\nlst = []\nlst.append(a)\nlst.append(b)\nlst.append(c)\nlst.sort()\n\nprint(lst[2] - lst[1] + (lst[1] -lst[0]))', 's = str(input())\nt = str(input())\n', 's = str(input())\nt = str(input())\ns = \'\'.join(sorted(s))\nt = \'\'.join(sorted(t))\n\nif s == t:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\ns = \'\'.join(sorted(s))\nt = \'\'.join(sorted(t))\n\nprint(s)\nprint(t)\nif s == t:\n print("yes")\nelse:\n print("no")', 's,t = map(str,input().split())\ns = \'\'.join(sorted(s))\nt = \'\'.join(sorted(t))\n \nprint(s)\nprint(t)\nif s == t:\n print("yes")\nelse:\n print("no")\n', 'import math\n\na,b,c = map(int,input().split())\nlst = []\nlst.append(a)\nlst.append(b)\nlst.append(c)\nlst.sort()\n\nprint(lst[2] - lst[1] + (lst[1] - lst[0]))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s016148653', 's074259586', 's103831044', 's116216091', 's310746327', 's506487782', 's725873868'] | [2940.0, 3060.0, 2940.0, 2940.0, 3060.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [86, 169, 34, 131, 139, 148, 152] |
p03292 | u441320782 | 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 = [i for i in input()]\nT = [j for j in input()] \n\nx = sorted(S)\ny = sorted(T)\nk = None\n\nif x == y:\n for i in range(len(S)):\n O = S.copy()\n S.pop()\n S.insert(0,O[-1])\n if S == T:\n print("Yes")\n break\n else:\n print("NO")\nelse:\n print("No")\n\n', 'x =list(map(int,input().split()))\n\nx.sort()\nprint((x[1]-x[0])+(x[2]-x[1]))'] | ['Runtime Error', 'Accepted'] | ['s797950893', 's431144890'] | [3060.0, 2940.0] | [18.0, 17.0] | [269, 74] |
p03292 | u442948527 | 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,b,c=sorted(map(int,input().split()))\nprint(c-a)'] | ['Runtime Error', 'Accepted'] | ['s330097912', 's350266749'] | [8984.0, 9108.0] | [25.0, 29.0] | [47, 49] |
p03292 | u443569380 | 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())\nL = [int(i) for i in input().split()]\nprint(sum(L - N) )', 'L = list(map(int,input().split()))\nans = 0\nmin_L = min(L)\nL.remove(min_L)\ncnt = min_L\nsorted_L = sorted(L)\nfor i in sorted_L:\n ans += abs(i - cnt )\n cnt = i\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s014124149', 's300251905'] | [2940.0, 3060.0] | [17.0, 17.0] | [73, 173] |
p03292 | u444398697 | 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 = list(map(int,input().split()))\nprint(sum(a)-n)\n', 'a = list(map(int,input().split()))\n\na.sort()\n\nprint((a[2]-a[1])+(a[1]-a[0]))\n'] | ['Runtime Error', 'Accepted'] | ['s718456536', 's793012710'] | [2940.0, 2940.0] | [17.0, 17.0] | [68, 77] |
p03292 | u444856278 | 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. | ['from sys import stderr\nfrom functools import reduce\nfrom operator import add\ndef f(): return [int(i) for i in input().split()]\ndef debug(*x, sep=" ", end="\\n"):\n for item in x:\n stderr.write(repr(item))\n stderr.write(sep)\n stderr.write(end)\n\na1,a2,a3 = f()\n\na = abs(a1-a2)\nb = abs(a2-a3)\nc = abs(a3-a1)\nprint(min(a,b,c))', 'from sys import stderr\nfrom functools import reduce\nfrom operator import add\ndef f(): return [int(i) for i in input().split()]\ndef debug(*x, sep=" ", end="\\n"):\n for item in x:\n stderr.write(repr(item))\n stderr.write(sep)\n stderr.write(end)\n\na1,a2,a3 = f()\n\na = abs(a1-a2)\nb = abs(a2-a3)\nc = abs(a3-a1)\nprint(min(a+b,b+c,c+a))'] | ['Wrong Answer', 'Accepted'] | ['s144399398', 's448993123'] | [3828.0, 3572.0] | [29.0, 22.0] | [340, 346] |
p03292 | u445628522 | 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,intput().split()))\ntask.sort()\ncost=0\nfor i in range(1,3):\n cost+=task[i]-task[i-1]\n\nprint(cost)\n', 'task=list(map(int,input().split()))\nprint(sorted(task)[2]-sorted(task)[0])'] | ['Runtime Error', 'Accepted'] | ['s053156381', 's251995789'] | [2940.0, 2940.0] | [17.0, 17.0] | [118, 74] |
p03292 | u446711904 | 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(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(a-b)+abs(c-a),abs(c-b)+abs(a-c),abs(a-c)+abs(b-a),abc(b-c)+abs(a-b)))', 'a,b,c=map(int,input().split())\nprint(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(a-b)+abs(c-a),abs(c-b)+abs(a-c),abs(a-c)+abs(b-a),abs(b-c)+abs(a-b)))'] | ['Runtime Error', 'Accepted'] | ['s945565969', 's173081464'] | [3060.0, 3060.0] | [17.0, 17.0] | [150, 150] |
p03292 | u453500284 | 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'] | ['s200967345', 's363116188'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 54] |
p03292 | u461636820 | 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. | ['1, A2, A3 = map(int, input().split())\nprint(max(A1,A2,A3)-min(A1,A2,A3))', 'A1, A2, A3 = map(int, input().split())\nprint(max(A1,A2,A3)-min(A1,A2,A3))'] | ['Runtime Error', 'Accepted'] | ['s190200924', 's749874490'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 73] |
p03292 | u462434199 | 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 = list(map(input().split(), int))\n\nprint(x.max() - x.min())', 'x = list(map(int, input().split()))\nprint(max(x) - min(x))'] | ['Runtime Error', 'Accepted'] | ['s442184197', 's052254292'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 58] |
p03292 | u466238961 | 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())\ntasks=[A1,A2,A3]\ncosts=[]\ndef cost(start):\n for i in range(3):\n if i!=start:\n cost_1st=abs(tasks[i]-tasks[start])\n for l in range(3):\n if l != i and l != start:\n total_cost=cost_1st+abs(tasks[i]-tasks[l])\n costs.append(total_cost)\n else:\n continue\n else:\n continue\nfor i in range(3):\n cost(i)\nprint(costs)\nans=min(costs)\n\nprint(ans)\n', '[A1,A2,A3]=map(int,input().split())\ntasks=[A1,A2,A3]\ncosts=[]\ndef cost(start):\n for i in range(3):\n if i!=start:\n cost_1st=abs(tasks[i]-tasks[start])\n for l in range(3):\n if l != i and l != start:\n total_cost=cost_1st+abs(tasks[i]-tasks[l])\n costs.append(total_cost)\n else:\n continue\n else:\n continue\nfor i in range(3):\n cost(i)\n\nans=min(costs)\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s432551651', 's115966376'] | [3064.0, 3064.0] | [17.0, 17.0] | [509, 497] |
p03292 | u466917094 | 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=input()\nb=input()\nfor i in range(0,len(a)):\n if a==b[i:]+b[:i] : \n print("Yes")\n exit(0)\nprint("No")', 'lis=map(int,input().split())\nprint(max(lis)-min(lis))', 'lis=[int(i) for i in input().split()]\nprint(max(lis)-min(lis))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s169678132', 's214937638', 's061148109'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0] | [109, 53, 62] |
p03292 | u469239325 | 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()))\ns = sorted(a).reverse\nans = [s[i+1]-s[i] for i in range(2)]\nprint(sum(ans))', 'a = list(map(int, input().split()))\ns = sorted(a, reverse=True)\nans = [s[i]-s[i+1] for i in range(2)]\nprint(sum(ans))\n'] | ['Runtime Error', 'Accepted'] | ['s152285001', 's420574800'] | [2940.0, 3316.0] | [17.0, 21.0] | [111, 118] |
p03292 | u475675023 | 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, raw_input().split()))\nMAX=max(L)\nMIN=min(L)\nprint(MAX-MIN)', 'L = list(map(int, input().split()))\nMAX=max(L)\nMIN=min(L)\nprint(MAX-MIN)'] | ['Runtime Error', 'Accepted'] | ['s509794755', 's604293411'] | [2940.0, 2940.0] | [18.0, 17.0] | [76, 72] |
p03292 | u477343425 | 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 = sorted(map(int, input().split()))\nans = max(L) - min(L)\nprint('ans')\n", 'L = sorted(map(int, input().split()))\nans = max(L) - min(L)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s735206002', 's895233059'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 70] |
p03292 | u485716382 | 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 gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\ndef lcm(a, b):\n\treturn a * b // gcd (a, b)\n\ndef f(m, input):\n r = 0\n for i in input:\n r += m % i\n return r\n\nN = map(int, input())\na_n = list(map(int, input().split(" ")))\na_n = sorted(a_n)\n\nmax = 0\nfor x in a_n:\n max += x\n \n# result = []\n# for m in range(max):\n # out = f(m, a_n)\n # result.append(out)\n\n#print(re[-1])\n#print(max) #994 518 941 851 647 2 581 -> 4534\nprint(max - len(a_n))', "A = map(int, input().split(' '))\nA = sorted(A)\n\nresult = 0\nfor i in range(len(A)-1):\n result += A[i+1] - A[i]\nprint(result)"] | ['Runtime Error', 'Accepted'] | ['s442050583', 's791914328'] | [3064.0, 2940.0] | [19.0, 17.0] | [470, 124] |
p03292 | u487288850 | 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,b,c = map(int,input().split())\nl=sorted([a,b,c])\nprint(l[2]-l[1]+l[1]-l[0])\n', 'a,b,c = map(int,input().split())\nl=sorted([a,b,c])\nprint(l[2]-l[1]+l[1]-l[0])\n'] | ['Runtime Error', 'Accepted'] | ['s071099064', 's775649026'] | [9088.0, 9016.0] | [25.0, 29.0] | [111, 78] |
p03292 | u488178971 | 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. | ['#103\nA =[int(j) for j in input().split()]\nprint(abs(A[2]-A[0]))', '#103\nA =[int(j) for j in input().split()]\nA.sort()\nprint(abs(A[2]-A[0]))'] | ['Wrong Answer', 'Accepted'] | ['s321168150', 's810575543'] | [2940.0, 2940.0] | [17.0, 17.0] | [63, 72] |
p03292 | u488934106 | 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 Task(al):\n\n al.sort\n\n return (al[-1] - al[-2]) + (al[-2] - al[0])\n\ndef main():\n al = list(map(int , input().split()))\n print(Task(al))\n\nif __name__ == '__main__':\n main()", "def Task(al):\n\n return max(al) - min(al)\n\ndef main():\n al = list(map(int , input().split()))\n print(Task(al))\n\nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s403769293', 's115037322'] | [2940.0, 2940.0] | [17.0, 18.0] | [189, 157] |
p03292 | u492030100 | 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. | ['class Need(object):\n def __init__(self,arg1,arg2):\n self.island1=int(arg1)\n self.island2=int(arg2)\n self.bridge=[]\n for i in range(arg1,arg2):\n self.bridge.append(i)\n def GETbridge(self):\n return self.bridge\ndeadbridges=0\nislands,needsnum=map(int,input().split())\nbridge=[0 for _ in range(islands-1)]\nbox = []\nfor i in range(needsnum):\n arg1,arg2=map(int,input().split())\n box.append(Need(arg1,arg2))\n\nwhile(len(box)!=1):\n bridge = [0 for _ in range(islands - 1)]\n for need in box:\n list=need.GETbridge()\n for ing in list:\n bridge[ing-1]=bridge[ing-1]+1\n \n maxi=0\n for i in range(len(bridge)):\n if(bridge[i]>bridge[maxi]):\n maxi=i\n \n deadbridges=deadbridges+1\n \n kill=False\n for i in range(len(box)):\n try:\n s=box[i].GETbridge()\n except:\n break\n for k in s:\n if(k==bridge[maxi]):\n kill=True\n break\n if(kill):\n box.pop(i)\n i=i-1\nprint(deadbridges)', 'class Need(object):\n def __init__(self,arg1,arg2):\n self.island1=int(arg1)\n self.island2=int(arg2)\n self.bridge=[]\n for i in range(arg1,arg2):\n self.bridge.append(i)\n def GETbridge(self):\n return self.bridge\ndeadbridges=0\nislands,needsnum=map(int,input().split())\nbridge=[0 for _ in range(islands-1)]\nbox = []\nfor i in range(needsnum):\n arg1,arg2=map(int,input().split())\n box.append(Need(arg1,arg2))\n\nwhile(len(box)!=1):\n bridge = [0 for _ in range(islands - 1)]\n for need in box:\n list=need.GETbridge()\n for ing in list:\n bridge[ing-1]=bridge[ing-1]+1\n \n maxi=0\n for i in range(len(bridge)):\n if(bridge[i]>bridge[maxi]):\n maxi=i\n \n deadbridges=deadbridges+1\n \n kill=False\n for i in range(len(box)):\n try:\n s=box[i].GETbridge()\n except:\n break\n for k in s:\n if(k==bridge[maxi]):\n kill=True\n break\n if(kill):\n box.pop(i)\n i=i-1\nprint(deadbridges)', 'list=input().split()\nfor i in list:\n i=int(i)\nlist.sort()\nsumcosts=0\ncosts=0\nfirst=True\nmae=0\nfor i in list:\n i = int(i)\n if(first):\n first=False\n mae=i\n else:\n sumcosts=sumcosts+abs((i-mae))\n mae=i\nprint(sumcosts)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s529917449', 's865089342', 's649554807'] | [3064.0, 3064.0, 3060.0] | [19.0, 17.0, 19.0] | [1166, 1166, 256] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.