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
|
---|---|---|---|---|---|---|---|---|---|---|
p03308 | u476199965 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['a = int(input())\nb = for list(map(int,input().split()))\nmin = b[0]\nmax = b[0]\nfor i in range(a):\n if b[i] < min:min=b[i]\n if b[i] > max:max=b[i]\nprint(max-min)\n', 'a = int(input)\nb = map(int,input().split())\nmin = b[0]\nmax = b[0]\nfor i in range(a):\n if b[i] < min:min=b[i]\n if b[i] > max:max=b[i]\nprint(max-min)', 'a = int(input())\nb = list(map(int,input().split()))\nmin = b[0]\nmax = b[0]\nfor i in range(a):\n if b[i] < min:min=b[i]\n if b[i] > max:max=b[i]\nprint(max-min)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s541723003', 's984235368', 's081194924'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [166, 153, 162] |
p03308 | u477343425 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['l = sorted(list(map(int, input().split())))\nans = l[-1] - l[0]\nprint(ans)', 'input()\na = sorted(map(int,input().split()))\nprint(a[-1] - a[0])\n\n'] | ['Wrong Answer', 'Accepted'] | ['s295677656', 's827264753'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 66] |
p03308 | u480200603 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int, input().split()))\nans = 0\nfor i in range(1, n):\n ans = max(abs(a[i] - a[i - 1]), ans)\nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a) - min(a))'] | ['Wrong Answer', 'Accepted'] | ['s184962326', 's299165593'] | [2940.0, 2940.0] | [17.0, 17.0] | [134, 75] |
p03308 | u481533080 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input("input N ,")) \nlista=input("input A ,").split() \np=int(lista[0])\nq=int(lista[0])\nfor i in range(1,n):\n k=int(lista[i])\n if k<=p:\n p=k\n elif k>=q:\n q=k\nprint(int(q)-int(p))', 'n=int(input()) \nlista=input().split() \np=int(lista[0])\nq=int(lista[0])\nfor i in range(1,n):\n k=int(lista[i])\n if k<=p:\n p=k\n elif k>=q:\n q=k\nprint(int(q-p))'] | ['Wrong Answer', 'Accepted'] | ['s090452728', 's681472029'] | [9164.0, 9172.0] | [33.0, 24.0] | [250, 223] |
p03308 | u486302338 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nnums = [int(input()) for i in range(N)]\n\nprint(max(nums) - min(nums))', 'N = int(input())\nnums = list(map(int, input().split()))\n\nprint(max(nums)-min(nums))'] | ['Runtime Error', 'Accepted'] | ['s745441550', 's350330158'] | [2940.0, 2940.0] | [19.0, 17.0] | [86, 83] |
p03308 | u492532572 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA_list = list(map(int, input().split()))\nB_list = [a - (i + 1) for i, a in enumerate(A_list)]\nB_list.sort()\nb = B_list[len(B_list) / 2]\ns = sum([abs(B - b) for B in B_list])\nprint(s)', 'N = int(input())\nA_list = list(map(int, input().split()))\nprint(max(A_list) - min(A_list))'] | ['Runtime Error', 'Accepted'] | ['s488848415', 's153967378'] | [3064.0, 2940.0] | [18.0, 17.0] | [199, 90] |
p03308 | u493491792 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\na=list(map(int,input().split()))\nma=max(a)-min(a)\nprint(ma', 'n=int(input())\na=list(map(int,input().split()))\nma=max(a)-min(a)\nprint(ma)'] | ['Runtime Error', 'Accepted'] | ['s377568976', 's175880925'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 74] |
p03308 | u497363157 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = input()\naryA = input().split(" ")\n\nN = int(N)\naryA = [int(s) for s in aryA]\nans = []\nfor x in range(len(aryA) - 1):\n ans.append(abs(aryA[x+1] - aryA[x]))\n\nprint(max(ans))', 'N = input()\naryA = input().split(" ")\n\nN = int(N)\naryA = [int(s) for s in aryA]\nans = []\nfor x in range(len(aryA) - 1):\n for y in range(len(aryA)):\n ans.append(abs(aryA[x] - aryA[y]))\n\nprint(max(ans))'] | ['Wrong Answer', 'Accepted'] | ['s367584255', 's630462585'] | [3060.0, 3316.0] | [17.0, 20.0] | [177, 210] |
p03308 | u498575211 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\na = list(map(int, input().split()))\nmax = 0\nfor i in range(len(a)+1):\n for j in range(i+1, len(a)):\n print(i, j)\n if max < abs(a[i] - a[j]):\n max = abs(a[i] - a[j])\nprint(max)', 'N = int(input())\na = list(map(int, input().split()))\nmax = 0\nfor i in range(len(a)+1):\n for j in range(i+1, len(a)):\n #print(i, j)\n if max < abs(a[i] - a[j]):\n max = abs(a[i] - a[j])\nprint(max)'] | ['Wrong Answer', 'Accepted'] | ['s561100701', 's952023609'] | [3608.0, 3060.0] | [23.0, 18.0] | [204, 205] |
p03308 | u503901534 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int,input().split()))\nb = a.sort()\nprint(abs(b[0] - b[-1]))', 'n = int(input())\na = list(map(int,input().split()))\nb = list(sorted(a))\nprint(abs(b[0] - b[-1]))'] | ['Runtime Error', 'Accepted'] | ['s153475606', 's345563999'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 96] |
p03308 | u514299323 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = input().split(" ")\nB = [int(n) for n in A]\n\nm = 0\nM = 0\nfor b in B:\n if b < m:\n m = b\n \n if b > M:\n M = b\n\nprint(M-m)', ' N = int(input())\n A = input().split(" ")\n B = [int(n) for n in A]\n \n m = float("inf")\n M = 0\n for b in B:\n if b < m:\n m = b\n \n if b > M:\n M = b\n \n print(M-m)', ' N = int(input())\n A = input().split(" ")\n B = [int(n) for n in A]\n \n m = inf\n M = 0\n for b in B:\n if b < m:\n m = b\n \n if b > M:\n M = b\n \n print(M-m)', 'N = int(input())\nA = input().split(" ")\nB = [int(n) for n in A]\n \nm = float("inf")\nM = 0\nfor b in B:\n if b < m:\n m = b\n \n if b > M:\n M = b\n \nprint(M-m)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s413690711', 's491369955', 's904334495', 's648073254'] | [3060.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 24.0, 17.0] | [147, 272, 207, 196] |
p03308 | u519939795 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int,input().split()))\nl = []\nfor i in range(n+1):\n for j in range(n+1):\n l.append(abs(a[i]-a[j]))\nprint(max(l))', 'n=int(input())\na=sorted(map(int,input().split()))\nprint(a[-1]-a[0])'] | ['Runtime Error', 'Accepted'] | ['s236517212', 's092220492'] | [2940.0, 2940.0] | [17.0, 17.0] | [151, 67] |
p03308 | u527925554 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = list(map(int, input().split()))\n\nprint(abs(max(N) - min(N)))', 'N = list(map(float, input().split()))\n\nprint(int(abs(max(N) - min(N))))\n', '_, N = input(), list(map(float, input().split()))\n\nmax = 0\nmin = 10 ** 9\n\nfor i in N:\n if max < i:\n max = i\n if min > i:\n min = i\n\nprint(int(abs(min - max)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s064611127', 's100237928', 's725437859'] | [3064.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [64, 72, 177] |
p03308 | u529722835 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA_list = [int(a) for a in input().split()]\nA_list.sort()\nprint(max([A_list[i+1]-A_list[i] for i in range(N-1)]))', 'N = int(input())\nA_list = [int(a) for a in input().split()]\nA_list.sort()\nprint(A_list[-1]-A_list[0])'] | ['Wrong Answer', 'Accepted'] | ['s803404197', 's419191483'] | [2940.0, 2940.0] | [18.0, 18.0] | [129, 101] |
p03308 | u540877546 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\na = list(map(int,split(input())))\na.sort()\nprint(abs(a[0]-a[-1]))', 'n=int(input())\na = list(map(int,input().split()))\na.sort()\nprint(abs(a[0]-a[-1]))\n'] | ['Runtime Error', 'Accepted'] | ['s549645008', 's171673638'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 82] |
p03308 | u548545174 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['A = list(map(int, input().split()))\n\nA = sorted(A)\nprint(A[-1] - A[0])', 'N = int(input())\nA = list(map(int, input().split()))\n\nA = sorted(A)\nprint(A[-1] - A[0])'] | ['Wrong Answer', 'Accepted'] | ['s122197982', 's649664583'] | [2940.0, 2940.0] | [19.0, 17.0] | [70, 87] |
p03308 | u549161102 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = [int(i) for i in input().split()]\nsort.A\ndif = A[N-1]-A[0]\nprint(dif)', 'N = int(input())\nA = [int(i) for i in input().split()]\nA.sort()\ndif = A[N-1]-A[0]\nprint(dif)\n'] | ['Runtime Error', 'Accepted'] | ['s575210417', 's832958942'] | [2940.0, 2940.0] | [17.0, 17.0] | [90, 93] |
p03308 | u550535134 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = sorted(list(map(int, input().split())))\nprint(A[N+1]-A[0])', 'N = int(input())\nA = sorted(list(map(int, input().split())))\nprint(A[N+-]-A[0])', 'N = int(input())\nA = sorted(list(map(int, input().split())))\nprint(A[N-1]-A[0])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s163895720', 's953937888', 's676438720'] | [2940.0, 2940.0, 3316.0] | [17.0, 17.0, 22.0] | [79, 79, 80] |
p03308 | u553070631 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = input()\na = list(map(int,input().split()))\n\n print(max(a)-min(a))\n', 'n = input()\na = list(map(int,input().split()))\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s692128143', 's125294462'] | [2940.0, 2940.0] | [17.0, 18.0] | [70, 68] |
p03308 | u558242240 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int , input().split()))\nans = 0\nprev = a[0]\nfor ai in a:\n ans = max(ans, abs(prev - ai))\n prev = ai\nprint(ans)', 'n = int(input())\na = list(map(int , input().split()))\nans = 0\nfor ai in a:\n for bi in a:\n ans = max(ans, abs(bi - ai))\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s063204100', 's700065148'] | [2940.0, 3060.0] | [17.0, 20.0] | [146, 139] |
p03308 | u558782626 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['input()\nnumbers = map(int, input().split())\nprint(max(numbers)-min(numbers))', 'input()\nnumbers = list(map(int, input().split()))\nprint(max(numbers)-min(numbers))\n'] | ['Runtime Error', 'Accepted'] | ['s520243508', 's651190277'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 83] |
p03308 | u560072805 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input())\nA=list(map(int,input().split()))\nA.sort()\nprint(A[N]-A[0])', 'N=int(input())\nA=list(map(int,input().split()))\nA.sort()\nprint(A[N-1]-A[0])'] | ['Runtime Error', 'Accepted'] | ['s348929170', 's371374905'] | [9164.0, 9028.0] | [22.0, 33.0] | [73, 75] |
p03308 | u569041543 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\na = map(int, input().split)\n\nprint(max(a) - min(a))', 'N = int(input())\na = list(map(int, input().split))\n\nprint(max(a) - min(a))', 'N = int(input())\na = list(map(int, input().split()))\n\nprint(max(a) - min(a))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s076201328', 's436065632', 's967375712'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [68, 74, 76] |
p03308 | u578489732 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["# -*- coding: utf-8 -*-\nimport sys\n# ----------------------------------------------------------------\n# Use Solve Function\n\ndef solve(lines):\n N = int(lines.pop(0))\n L = list(map(int, lines.pop(0).split(' ')))\n L.sort()\n print(L[-1] - L[0])\n\n#\n# main\n#\n\n# 1. use list instead of stdin\n\n# contents = '''\\\n# 4\n# 1 4 6 3\\\n# '''\n\n\n# 2. use stdin\n\n# lines = [x.strip() for x in sys.stdin.readlines()]\n\n#\n# solve !!\n#\nsolve(lines)", "# -*- coding: utf-8 -*-\nimport sys\n# ----------------------------------------------------------------\n# Use Solve Function\n\ndef solve(lines):\n N = int(lines.pop(0))\n L = list(map(int, lines.pop(0).split(' ')))\n L.sort()\n print(L[-1] - L[0])\n\n#\n# main\n#\n\n# 1. use list instead of stdin\n\n# contents = '''\\\n# 4\n# 1 4 6 3\\\n# '''\n\n\n# 2. use stdin\n\nlines = [x.strip() for x in sys.stdin.readlines()]\n\n#\n# solve !!\n#\nsolve(lines)"] | ['Runtime Error', 'Accepted'] | ['s902350096', 's995204587'] | [2940.0, 3060.0] | [18.0, 17.0] | [466, 464] |
p03308 | u584529823 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = list(map(intm input().split()))\n\nprint(max(A) - min(A))\n ', 'N = int(input())\nA = list(map(int, input().split()))\n \n# print(max(A) - min(A))\n\nmin = A[0]\nmax = A[0]\nfor i in range(N):\n if A[i] > max:\n max = A[i]\n if A[i] < min:\n min = A[i]\nprint(max - min)'] | ['Runtime Error', 'Accepted'] | ['s385035577', 's009728308'] | [2940.0, 3060.0] | [17.0, 17.0] | [79, 202] |
p03308 | u585265265 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['def main():\n N = int(input())\n A = []\n for i in range(N):\n A.append(int(input()))\n \n A.sort()\n print(A[N - 1] - A[0])\n \nif __name__ == "__main__":\n main()', 'def main():\n N = int(input())\n A = []\n for i in range(N):\n A.append(int(input()))\n \n A.sort()\n print(A[n - 1] - A[0])\n \nif __name__ == "__main__":\n main()', 'def main():\n N = int(input())\n A = []\n data = input().split()\n for i in range(N):\n A.append(int(data[i]))\n \n A.sort()\n print(A[N - 1] - A[0])\n \nif __name__ == "__main__":\n main()'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s338694135', 's848969149', 's430332411'] | [3060.0, 2940.0, 3060.0] | [24.0, 17.0, 17.0] | [185, 185, 212] |
p03308 | u586594818 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['import numpy as np\n\na = input()\nb = []\nb = input().split()\nans = 0\nfor i in a-1:\n for j in a-1:\n c = b[i]-b[j]\n if(ans < np.abs(c):\n ans = c\nprint(c)', 'import numpy as np\n\na = int(input())\nb = input().split()\nc = []\nfor i in range(a):\n c.append(int(b[i]))\nans = 0\nfor i in range(a):\n for j in range(a):\n d = c[i] - c[j]\n d = np.abs(d)\n if(ans < d):\n ans = d\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s588648093', 's304798846'] | [2940.0, 21536.0] | [17.0, 327.0] | [162, 233] |
p03308 | u595893956 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=input()\na=list(map(int,input().split()))\nprint(a.max()-a.min())', 'n=input()\na=list(map(int,input().split()))\nprint(max(a)-min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s670513115', 's754278593'] | [2940.0, 2940.0] | [18.0, 18.0] | [65, 64] |
p03308 | u600261652 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = input()\nlist = sorted(map(int, input().split()))\nprint(list[-1] - list[-2])', 'N = input()\nlist = sorted(map(int, input().split()))\nprint(list[-1] - list[0])'] | ['Wrong Answer', 'Accepted'] | ['s940228467', 's826481848'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 78] |
p03308 | u612721349 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['p=input;p();a=map(int,p().split());print(max(a)-min(a))', 'p=input;p();a=sorted(map(int,p().split()));print(a[-1]-a[0])'] | ['Runtime Error', 'Accepted'] | ['s555966788', 's962002553'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 60] |
p03308 | u614627871 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['def main():\n n = int(input())\n nums = input().split()\n print(nums)\n for i in range(len(nums)):\n nums[i] = int(nums[i])\n print(nums)\n max_diff = 0\n for i in range(len(nums)):\n for j in range(i, len(nums)):\n diff = abs(nums[i] - nums[j])\n if diff > max_diff:\n max_diff = diff\n print(max_diff)\n\nmain()\n', 'def main():\n n = int(input())\n nums = input().split()\n for i in range(len(nums)):\n nums[i] = int(nums[i])\n max_diff = 0\n for i in range(len(nums)):\n for j in range(i, len(nums)):\n diff = abs(nums[i] - nums[j])\n if diff > max_diff:\n max_diff = diff\n print(max_diff)\n\nmain()\n'] | ['Wrong Answer', 'Accepted'] | ['s350543369', 's120956936'] | [3060.0, 3060.0] | [19.0, 19.0] | [374, 342] |
p03308 | u623052494 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input())\na=list(map(int,input().split()))\nprint(a) \na_max=max(a)\na_min=min(a)\nprint(a_max-a_min)', 'N=int(input())\na=[0]*N\nfor i in range(N):\n a[i]=int(input())\nprint(a) \na_max=max(a)\na_min=min(a)\nprint(a_max-a_min)', 'N=int(input())\na_list=[int(input()) for i in range(N)]\nprint(a_list)\n \na_max=max(a_list)\na_min=min(a_list)\nprint(a_max-a_min)\n ', 'N=int(input())\na_list=[]\nfor i in range(N):\n a_list.append(int(input()))\n \na_max=max(a_list)\na_min=min(a_list)\nprint(a_max-a_min)\n ', 'N=int(input())\na_list=map(int,input().split())\n \na_max=max(a_list)\na_min=min(a_list)\nprint(a_max-a_min)\n ', 'N=int(input())\na=list(map(int,input().split())) \na_max=max(a)\na_min=min(a)\nprint(a_max-a_min)\n '] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s373201386', 's714562676', 's769788027', 's797068758', 's827586961', 's286089219'] | [2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 18.0, 17.0] | [104, 120, 133, 140, 111, 98] |
p03308 | u623601489 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['input()\nlst=list(map(int,input().split())).sort()\nprint(lst[-1]-lst[0])', 'i=input;i();l=sorted(map(int,i().split()));print(l[-1]-l[0])'] | ['Runtime Error', 'Accepted'] | ['s322882688', 's793481697'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 60] |
p03308 | u623687794 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input()) \nnum=list(int,input().split())\nans=0\nfor i in range(n-1):\n for j in range(i+1,n):\n dif=abs(num[i]-num[j])\n if dif>ans:\n ans=dif\nprint(ans)', 'n=int(input()) \nnum=list(map(int,input().split()))\nans=0\nfor i in range(n-1):\n for j in range(i+1,n):\n dif=abs(num[i]-num[j])\n if dif>ans:\n ans=dif\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s637655842', 's413416915'] | [3060.0, 2940.0] | [17.0, 19.0] | [165, 171] |
p03308 | u629276590 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\n\na=list(map(int,input().split()))\n\nmax=0\nfor i in range(n):\n for j in range(n):\n if i!=j:\n abs=abs(a[i]-a[j])\n if max<=abs:\n max=abs\n\n\nprint(max)\n \n', 'n=int(input())\n\na=list(map(int,input().split()))\n\nmax=0\nfor i in range(n):\n for j in range(n):\n if i!=j:\n x=int(a[i]-a[j])\n y=abs(x)\n if max<=y:\n y\n max=y\n\n\nprint(max)\n '] | ['Runtime Error', 'Accepted'] | ['s825099112', 's781694984'] | [2940.0, 2940.0] | [17.0, 22.0] | [213, 245] |
p03308 | u629540524 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['s = list(map(int, input().split()))\nprint(ma(s) - min(s))', 's = list(map(int, input().split()))\nprint(max(s) - min(s))', 'n = input()\ns = list(map(int, input().split()))\nprint(max(s) - min(s))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s343295483', 's535143366', 's623567680'] | [2940.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0] | [57, 58, 70] |
p03308 | u633914031 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=input()\nA=list(map(int, input().split()))\nA.sort()\nprint(A[N-1]-A[0])', 'N=int(input())\nA=list(map(int, input().split()))\nA.sort()\nprint(A[N-1]-A[0])'] | ['Runtime Error', 'Accepted'] | ['s436525797', 's624943538'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 76] |
p03308 | u634461073 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['a = int.input()\nl = list(map(int,input().split()))\nm = l[0]\nM = l[0]\nfor i in range(1,a):\n if l[i]<m:\n m = l[i]\n if l[i]>M:\n M=l[i]\nprint(M-m)', 'a = int.input()\nl = list(map(int,input().split()))\nm = l[0]\nM = l[0]\nfor i in range(1,a):\n if l[i]<m:\n m = l[i]\n else:\n if l[i]>M:\n M=l[i]\n else:\n pass\n \nprint(M-m)', 'a = int.input()\nl = list(map(int,input().split()))\nm = l[0]\nM = l[0]\nfor i in range(1,a):\n if l[i]<m:\n m = i[i]\n if l[i]>M:\n M=l[i]\nprint(M-m)', 'a = int.input()\nl = list(map(int,input().split()))\nm = l[0]\nM = l[0]\nfor i in range(1,a):\n if l[i]<m:\n m = l[i]\n else:\n if l[i]>M:\n M = l[i]\n else:\n pass\nprint(M-m)', 'a = int(input())\nl = list(map(int,input().split()))\nm = l[0]\nM = l[0]\nfor i in range(1,a):\n if l[i]<m:\n m = l[i]\n else:\n if l[i]>M:\n M = l[i]\n else:\n pass\nprint(M-m)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s088945923', 's278363778', 's448445706', 's628072828', 's361254481'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [150, 186, 150, 185, 186] |
p03308 | u635273885 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\na = list(map(int, input().split()))\nmax = 0\nfor i in range(len(a)):\n for j in range(i+1, len(a)):\n print(i,j)\n if abs(a[i] - a[j]) > max:\n max = abs(a[i] - a[j])\nprint(max)', 'N = int(input())\na = list(map(int, input().split()))\nmax = 0\nfor i in range(len(a)):\n for j in range(i+1, len(a)):\n if abs(a[i] - a[j]) > max:\n max = abs(a[i] - a[j])\nprint(max)'] | ['Wrong Answer', 'Accepted'] | ['s182309327', 's271987554'] | [3608.0, 3060.0] | [24.0, 18.0] | [217, 198] |
p03308 | u636311816 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\n\na = [map(int, input().split())]\n\namin= min(a)\namax= max(a)\n\nres= amax-amin\nprint(res)\n', 'n=int(input())\n \na = list(map(int, input().split()))\namin= min(a)\namax= max(a)\n \nres= amax-amin\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s754309992', 's520109096'] | [2940.0, 2940.0] | [17.0, 17.0] | [102, 106] |
p03308 | u641460756 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min)', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s242238321', 's767638019'] | [2940.0, 2940.0] | [17.0, 17.0] | [70, 73] |
p03308 | u652656291 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = list(map(int,input().split()))\nmaxi = max(n)\nmini = min(n)\nprint(maxi - mini)', 'n = int(input())\nl= list(map(int,input().split()))\nmaxi = max(l)\nmini = min(l)\nprint(maxi - mini)'] | ['Wrong Answer', 'Accepted'] | ['s896194706', 's687636615'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 97] |
p03308 | u657208344 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nmin_A = 10**9+7\nmax_A = -1\nfor i in range(n):\n tmp = int(input())\n max_A = max(tmp,max_A)\n min_A = min(min_A,tmp)\n \nprint(abs(max_A-min_A))\n', 'n = int(input())\nmin_A = 10**9+7\nmax_A = -1\nfor i in input().split():\n tmp = int(i)\n max_A = max(tmp,max_A)\n min_A = min(min_A,tmp)\n \nprint(abs(max_A-min_A))\n'] | ['Runtime Error', 'Accepted'] | ['s404580357', 's633637976'] | [8928.0, 9096.0] | [23.0, 25.0] | [161, 162] |
p03308 | u663710122 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = sorted([int(input()) for _ in range(N)])\n\nprint(A[N-1] - A[0])', 'N = int(input())\nA = sorted(map(int, input().split()))\n\nprint(A[N-1] - A[0])'] | ['Runtime Error', 'Accepted'] | ['s756216393', 's248300171'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 76] |
p03308 | u667694979 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input())\nA=list(map(int,input().split()))\nmax=0\n\nfor i in range(1,N-1):\n for j in range(i+1,N):\n if abs(A[i]-A[j])>=max:\n max=abs(A[i]-A[j])\nprint(max)', 'N=int(input())\nA=list(map(int,input().split()))\n\nprint(max(A)-min(A))'] | ['Wrong Answer', 'Accepted'] | ['s819984776', 's786418477'] | [3060.0, 2940.0] | [19.0, 17.0] | [166, 69] |
p03308 | u668705838 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int, input()))\nprint(max(a) - min(a))', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a) - min(a))\n'] | ['Runtime Error', 'Accepted'] | ['s320653638', 's349336040'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 76] |
p03308 | u668715715 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input().strip())\narry = list(map(int,input().strip().split()))\n\nmin = arry[1]\nmax = arry[1]\n\nprint (len(arry))\n\nfor i in range(len(arry)):\n if arry[i] < min:\n min = arry[i]\n if arry[i] > max:\n max = arry[i]\n\nprint (max-min)\n', 'n = int(input().strip())\narry = list(map(int,input().strip().split()))\n\nmin = arry[1]\nmax = arry[1]\n\n\nfor i in range(len(arry)):\n if arry[i] < min:\n min = arry[i]\n if arry[i] > max:\n max = arry[i]\n\nprint (max-min)\n'] | ['Wrong Answer', 'Accepted'] | ['s529732030', 's652211811'] | [3060.0, 3060.0] | [17.0, 17.0] | [241, 222] |
p03308 | u669770658 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\n\nA = [i for i in input().split()]\n\nprint(max(A) - min(A))', 'N = int(input())\n\nA = [int(i) for i in input().split()]\n\nprint(max(A) - min(A))\n\n'] | ['Runtime Error', 'Accepted'] | ['s696795627', 's797095344'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 81] |
p03308 | u686036872 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nlist=list(max(int, input().split()))\nlist.sort()\nprint(list[-1]-list[0])', 'N = int(input())\nlist=list(map(int, input().split()))\nlist.sort()\nprint(list[-1]-list[0])'] | ['Runtime Error', 'Accepted'] | ['s870278446', 's128296799'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 89] |
p03308 | u687044304 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['# -*- coding:utf-8 -*-\n\ndef solve():\n N = input()\n A = list(map(int, input().split()))\n min_a = 0\n max_a = float("inf")\n for a in A:\n min_a = min(min_a, a)\n max_a = max(max_a, a)\n print(max_a - min_a)\n\nif __name__ == "__main__":\n solve()\n', '# -*- coding:utf-8 -*-\n\ndef solve():\n N = input()\n A = list(map(int, input().split()))\n min_a = float("inf")\n max_a = 0\n for a in A:\n min_a = min(min_a, a)\n max_a = max(max_a, a)\n print(max_a - min_a)\n\nif __name__ == "__main__":\n solve()\n'] | ['Wrong Answer', 'Accepted'] | ['s370565745', 's095921900'] | [2940.0, 2940.0] | [17.0, 17.0] | [273, 273] |
p03308 | u690442716 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = input()\nA = A.split()\nL = len(A)\nB =[]\nfor i in range(L):\n B.append(int(a[i]))\nB.sort(reverse=True)\nans = B[0] - B[L-1]\n\nprint(ans)\n', 'N = int(input())\nA = input()\nA = A.split()\nL = len(A)\nB =[]\nfor i in range(L):\n B.append(int(A[i]))\nB.sort(reverse=True)\nans = B[0] - B[L-1]\n\nprint(ans)\n\n'] | ['Runtime Error', 'Accepted'] | ['s591947183', 's060738438'] | [3060.0, 3060.0] | [17.0, 17.0] | [156, 157] |
p03308 | u693378622 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = map(int,input().split())\n\nans = 0\nfor i in range(n):\n for j in range(i):\n t = abs(a[j]-a[i])\n if ans < t:\n ans = t\n\nprint(ans)', 'n = int(input())\na = list(map(int,input().split()))\n\na.sort()\n\nprint(a[n-1]-a[0])'] | ['Runtime Error', 'Accepted'] | ['s510865706', 's950867386'] | [3316.0, 2940.0] | [27.0, 19.0] | [172, 81] |
p03308 | u693776163 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\n\na = list(map(int,input().split())\nprint(abs(max(a)-min(a))\n \n ', 'N = int(input())\n\na = list(map(int, input().split()))\nprint(abs(max(a) - min(a)))\n'] | ['Runtime Error', 'Accepted'] | ['s992636995', 's800983645'] | [2940.0, 2940.0] | [18.0, 18.0] | [96, 82] |
p03308 | u699944218 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = input()\nA = list(map(int, input().split())\nprint(int(max(A))-int(min(A)))', 'N = input()\nA = [int(i) for input().split()]\nint(max) = 0\nint(min) = 0\nfor i in N:\n if int(max) < A[i]:\n max = A[i]\nfor i in N:\n if int(min) > A[i]:\n min = A[i]\n\nabs = max - min\nprint(int(abs))', 'n = input()\nA = list(map(int, input().split()))\nprint(int(max(A))-int(min(A)))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s264080382', 's937140030', 's486883650'] | [2940.0, 2940.0, 3316.0] | [17.0, 17.0, 19.0] | [77, 201, 78] |
p03308 | u717839182 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['def actual(N, a_list):\n num_min = 1\n num_max = 1\n\n for i in a_list:\n if i < num_min:\n num_min = i\n else:\n num_max = i\n\n return num_max - num_min\n\nN = int(input())\na_list = map(int, input().split())\n\nprint(actual(N, a_list))', 'def actual(N, a_list):\n s = set(a_list)\n \n return max(s) - min(s)\n\n\nN = int(input())\na_list = map(int, input().split())\n\nprint(actual(N, a_list))'] | ['Wrong Answer', 'Accepted'] | ['s305553247', 's518299714'] | [2940.0, 3060.0] | [17.0, 17.0] | [271, 154] |
p03308 | u728774856 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nnums = [int(num) for num in input().split()]\n\nnum_min = nums[0]\nnum_max = nums[0]\nfor item in nums:\n if item < num_min:\n num_min = item\n elif item > num_max:\n num_max = item\n else:\n\nprint(num_max - num_min)', 'n = int(input())\nnums = [int(num) for num in input().split()]\n\nnum_min = nums[0]\nnum_max = nums[0]\nfor item in nums:\n if item < num_min:\n num_min = item\n elif item > num_max:\n num_max = item\n else:\n \nprint(num_max - num_min)', 'n = int(input())\nnums = [int(num) for num in input().split()]\n\nnum_min = nums[0]\nnum_max = nums[0]\nfor item in nums:\n if item < num_min:\n num_min = item\n else item > num_max:\n num_max = item\n\nprint(num_max - num_min)', 'n = int(input())\nnums = [int(num) for num in input().split()]\n\nnum_min = nums[0]\nnum_max = nums[0]\nfor item in nums:\n if item < num_min:\n num_min = item\n if item > num_max:\n num_max = item\n\nprint(num_max - num_min)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s006647180', 's036013632', 's074300659', 's234986910'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0] | [232, 236, 224, 222] |
p03308 | u729133443 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['input();a=map(int,input().split());print(max(a)-min(a))', '_,a=open(0);*a,=map(int,a.split());print(max(a)-min(a))'] | ['Runtime Error', 'Accepted'] | ['s977989944', 's732192004'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 55] |
p03308 | u731436822 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = list(map(int,input().split()))\n\nmaxi = A[0]\nmini = A[0]\nfor i in range(N-1):\n if A[i] < A[i+1]:\n maxi = A[i+1]\n if A[i] > A[i+1]:\n mini = A[i+1]\nprint(maxi-mini)', 'N = int(input())\nA = list(map(int,input().split()))\n\nmaxi = A[0]\nmini = A[0]\nfor i in range(N):\n if maxi < A[i]:\n maxi = A[i]\n if mini > A[i]:\n mini = A[i]\nprint(maxi-mini)'] | ['Wrong Answer', 'Accepted'] | ['s300054283', 's291694506'] | [3064.0, 3060.0] | [17.0, 17.0] | [202, 192] |
p03308 | u732963817 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\na = np.array(list(map(int, input().split())))\nprint(max(a) - min(a))', 'N = int(input())\na = list(map(int, input().split()))\nprint(max(a) - min(a))'] | ['Runtime Error', 'Accepted'] | ['s185010788', 's582865252'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 75] |
p03308 | u733738237 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | [' =int(input())\nl =list(map(int,input().split()))\ns =(sorted(l))\nprint(s[-1]-s[0])', 'A =int(input())\nl =list(map(int,input().split()))\ns =(sorted(l))\nprint(s[-1]-s[0])'] | ['Runtime Error', 'Accepted'] | ['s351913395', 's550846052'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 82] |
p03308 | u734816542 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nA = list(map(int, input().split()))\nans = 0\nfor i, a in enumerate(A, 1):\n if i == len(A):\n break\n if ans < abs(a-A[i]):\n ans = abs(a-A[i])\nprint(ans)\n', 'n = int(input())\nA = list(map(int, input().split()))\nans = abs(max(A)-min(A))\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s373074354', 's036520498'] | [2940.0, 2940.0] | [17.0, 17.0] | [187, 89] |
p03308 | u734876600 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nli = list(input())\nprint(max(li)-min(li))', 'n = int(input())\nli = list(map(int,input().split()))\nprint(max(li)-min(li))'] | ['Runtime Error', 'Accepted'] | ['s985399812', 's142502260'] | [2940.0, 2940.0] | [18.0, 17.0] | [58, 75] |
p03308 | u737508101 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nh = list(map(int,input().split()))\na = int(input())\ndef getNearestValue(h, a):\n\tidx = np.abs(np.asarray(h) - a).argmin()\n\treturn h[idx]\nprint(getNearestValue(h, a))\n', 'n = int(input())\nmylist = list(map(int,input().split()))\nmylist = sorted(mylist, key=abs)\nx = mylist[0] - mylist[-1]\nprint(abs(x))\n'] | ['Runtime Error', 'Accepted'] | ['s055506865', 's512445117'] | [2940.0, 2940.0] | [17.0, 18.0] | [182, 131] |
p03308 | u737715061 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['#!/usr/bin/env python\nN = int(input())\nA = [int(i) for i in range(N)]\n\nmax_ = max(A)\nmin_ = min(A)\nprint(max_ - min_)', '#!/usr/bin/env python\nN = int(input())\nA = [int(i) for i in input().split()]\n\nmax_ = max(A)\nmin_ = min(A)\nprint(max_ - min_)'] | ['Wrong Answer', 'Accepted'] | ['s364064117', 's393478967'] | [2940.0, 3316.0] | [17.0, 18.0] | [117, 124] |
p03308 | u746300610 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['a=input().split()\nb=map(int,a)\nmaximum=max(b)\nminimum=min(b)\nprint(maximum-minimum)', 'q=input()\na=input().split()\nb=map(int,a)\nmaximum=max(b)\nminimum=min(b)\nprint(maximum-minimum)', 'q=input()\na=input().split()\nb=[int(i) for i in a]\nmaximum=max(b)\nminimum=min(b)\nprint(maximum-minimum)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s358173547', 's753373699', 's724883072'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [83, 93, 103] |
p03308 | u752700460 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = list(map(int, input().split()))\n\nfor i in a:\n if i < 0:\n i *= -1\n\na.sort()\nprint(a[0]-a[-1])\n', 'n = int(input())\na = list(map(int, input().split()))\n\nfor i in range(n):\n if a[i] < 0:\n a[i] *= -1\n\na.sort()\nprint(a[-1]-a[0])\n'] | ['Wrong Answer', 'Accepted'] | ['s426244749', 's303633489'] | [2940.0, 2940.0] | [17.0, 17.0] | [124, 137] |
p03308 | u757030836 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\n\na = [int(i) for i in input().split()]\n\ni=0\n\nc=0\nmax = 0\nmin = 0\nfor i in a[i]:\n if a[i] >= max:\n max = a[i]\n elif a[i] <= min:\n min = a[i]\n else\n i +=1\n \nprint (max - min)\n \n', 'N = int(input())\n\na = [int(i) for i in input().split()]\n\ni=0\n\nmax = 0\nmin = 0\nfor i in range(n):\n if a[i] >= max:\n max = a[i]\n elif a[i] <= min:\n min = a[i]\n else:\n continue\n \nprint (max - min)\n ', 'N = int(input())\n\na = [int(i) for i in input().split()]\n\ni=0\n\nmax = 0\nmin = 0\nfor i in range(n):\n if a[i] >= max:\n max = a[i]\n elif a[i] <= min:\n min = a[i]\n else\n continue\n \nprint (max - min)\n \n', 'N = int(input())\n\na = [int(i) for i in input().split()]\n\ni=0\n\nc=0\nmax = 0\nmin = 0\nfor i in range(n):\n if a[i] >= max:\n max = a[i]\n elif a[i] <= min:\n min = a[i]\n else\n i +=1\n \nprint (max - min)\n \n', 'n = int(input())\na = list(map(int, input().split()))\ndist = []\nfor i in range(n):\n for j in range(n):\n if i >= j:\n continue\n dist.append(abs(a[i]-a[j]))\nprint(max(dist))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s063440848', 's225221039', 's580691592', 's867443539', 's195467913'] | [3064.0, 3064.0, 2940.0, 2940.0, 3188.0] | [17.0, 17.0, 17.0, 17.0, 19.0] | [208, 211, 211, 212, 198] |
p03308 | u757274384 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nA = list(map(int, input().split()))\n\nANS = []\nfor i in range(len(A)):\n for j in range(i,len(A)+1):\n ANS.append(abs(A[i] - A[j]))\n \nprint(max(ANS))', 'n = int(input())\nA = list(map(int, input().split()))\n\nANS = []\nfor i in range(len(A)):\n for j in range(i,len(A)):\n ANS.append(abs(A[i] - A[j]))\n \nprint(max(ANS))'] | ['Runtime Error', 'Accepted'] | ['s125892381', 's844191045'] | [3060.0, 3188.0] | [17.0, 18.0] | [170, 168] |
p03308 | u759651152 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["#-*-coding:utf-8-*-\n\ndef main():\n \n N = int(input())\n lists = list(map(int, input().split()))\n\n \n max_element = 0\n\n \n for i in range(1, N):\n diff = lists[i] - lists[i-1]\n if diff > max_element:\n max_element = diff\n\n print(max_element)\n\n\nif __name__ == '__main__':\n main()", "#-*-coding:utf-8-*-\n\ndef main():\n \n N = int(input())\n lists = list(map(int, input().split()))\n\n \n max_element = 0\n min_element = lists[0]\n\n \n for i in range(N):\n if lists[i] > max_element:\n max_element = lists[i]\n if lists[i] < min_element:\n min_element = lists[i]\n\n print('{}'.format(max_element - min_element))\n\nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s975880271', 's887024646'] | [3060.0, 3064.0] | [17.0, 18.0] | [409, 500] |
p03308 | u760802228 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | [' = input()\nA = list(map(int, input().split()))\nprint(max(A) - min(A))', '_ = input()\nA = list(map(int, input().split()))\nprint(max(A) - min(A))'] | ['Runtime Error', 'Accepted'] | ['s167443116', 's294722715'] | [2940.0, 2940.0] | [17.0, 18.0] | [69, 70] |
p03308 | u766684188 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\nA=list(map(int,input().split()))\nA=sorted(A)\nans=A[n-1]-A[1]\nprint(ans)', 'n=int(input())\nA=list(map(int,input().split()))\nprint(max(A)-min(A))'] | ['Wrong Answer', 'Accepted'] | ['s602726421', 's051875501'] | [2940.0, 2940.0] | [18.0, 18.0] | [86, 68] |
p03308 | u771532493 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input())\nA=[int(i) for i in input()]\nmaxv=A[0]\nminv=A[1]-A[0]\nfor i in range(N):\n maxv=max(maxv,abs(A[i]-minv))\n minv=min(minv,A[i])\nprint(maxv)', 'N=int(input())\nA=[int(i) for i in input()]\nmaxv=A[0]\nminv=A[1]-A[0]\nfor i in range(N):\n maxv=max(maxv,A[i]-minv)\n minv=min(minv,A[i])\nprint(maxv)', 'N=int(input())\nA=[int(i) for i in input()]\nmaxv=A[0]\nminv=A[0]\nfor i in range(N):\n maxv=max(maxv,A[i])\n minv=min(minv,A[i])\nprint(maxv-minv)', 'N=int(input())\nA=[int(i) for i in input().split()]\nmaxv=A[0]\nminv=A[0]\nfor i in range(N):\n maxv=max(maxv,A[i])\n minv=min(minv,A[i])\nprint(maxv-minv)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s252228224', 's600977752', 's924700443', 's419595282'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 18.0] | [152, 147, 142, 150] |
p03308 | u776338097 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['def main():\n\tN = int(input())\n\tseq = list(map(int, input().split()))\n\tmaks = 0\n\tfor i in range(1, N):\n\t\tmaks = max(seq[i] - seq[i - 1])\n\tprint(maks)\n\treturn 0\nmain()', 'def main():\n\tN = int(input())\n\tseq = list(map(int, input().split()))\n\tmaks = 0\n\tfor i in range(0, N):\n\t\tfor j in range(i, N):\n\t\t\tmaks = max(abs(seq[j] - seq[i]), maks)\n\tprint(maks)\n\treturn 0\nmain()'] | ['Runtime Error', 'Accepted'] | ['s375550803', 's584813145'] | [3064.0, 3060.0] | [18.0, 18.0] | [165, 197] |
p03308 | u777394984 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = map(int, input().split())\nmax = 0\nmin = 0\nfor i in A:\n if max < i:\n max = i\n if min > i:\n min = i\nprint("{}".format(max - min))', 'N = int(input())\nA = sorted(map(int, input().split()))\nprint(A[-1] - A[0])'] | ['Wrong Answer', 'Accepted'] | ['s271332175', 's226426014'] | [3060.0, 2940.0] | [17.0, 19.0] | [157, 74] |
p03308 | u780475861 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['_ = input()\nlst = map(int, input().split())\n\nprint(max(lst) - min(lst))', '_ = input()\nlst = [int(i) for i in input().split()]\n\nprint(max(lst) - min(lst))'] | ['Runtime Error', 'Accepted'] | ['s954442329', 's371437007'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 79] |
p03308 | u787456042 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n,a=open(0);s=sorted(map(int,a.split()));print(s[-1]-s[1])', 'n,a=open(0);s=sorted(map(int,a.split()));print(s[-1]-s[0])'] | ['Wrong Answer', 'Accepted'] | ['s820576252', 's968985181'] | [2940.0, 2940.0] | [17.0, 17.0] | [58, 58] |
p03308 | u790877102 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nA = list(map(int,input().split())\nA = sorted(A)\nx = A[-1]-A[0]\nprint(x)\n\n', 'n = int(input())\nS = list(map(int,input().split())\n\na=soretd(S)\nprint(max(a)-min(a))\n', 'a = list(map(int, input().split()))\na.sort()\nprint(a[-1] - a[0])\n', 'n = int(input())\nS = list(map(int,input().split())\n\na=soretd(S)\nprint(a[-1]-a[1])\n', 'n = int(input())\nA = list(map(int,input().split()))\nA = sorted(A)\nx = A[-1]-A[0]\nprint(x)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s182073489', 's415031183', 's433866924', 's561148751', 's949424416'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [90, 85, 65, 82, 90] |
p03308 | u792512290 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['_n = int(input())\nlist = map(int(), input().split())\nlist.sort()\n\nprint(list[-1] - list[0])', '_n = int(input())\nlists = list(map(int(), input().split()))\nlists.sort()\n\nprint(lists[-1] - lists[0])', '_n = int(input())\nlists = list(map(int, input().split()))\nlists.sort()\n\nprint(lists[-1] - lists[0])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s773461899', 's775349630', 's969994731'] | [9096.0, 9064.0, 9064.0] | [27.0, 23.0, 26.0] | [91, 101, 99] |
p03308 | u796708718 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nlst = [int(n) for n in input().split(" ")]\nval_max = 0\nval_min = 0\nfor i in range(0,N):\n if val_max < lst[i]:\n val_max = lst[i]\n elif val_min > lst[i]:\n val_min = lst[i]\nprint(val_max-val_min)\n', 'N = int(input())\nlst = [int(n) for n in input().split(" ")]\nval_max = 0\nval_min = 0\nfor i in range(0,N):\n if val_max < i:\n val_max = i\n elseif val_min > i:\n val_min = i\nprint(val_max-val_min)', 'N = int(input())\nlst = [int(n) for n in input().split(" ")]\nval_max = 0\nval_min = 0\nfor i in range(0,N):\n if val_max < i:\n val_max = i\n elif val_min > i:\n val_min = i\nprint(val_max-val_min)\n', 'N = int(input())\nlst = [int(n) for n in input().split(" ")]\nval_max = lst[0]\nval_min = lst[0]\nfor i in lst:\n if val_max < i:\n val_max = i\n elif val_min > i:\n val_min = i\n \nprint(val_max-val_min)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s041169933', 's090459330', 's221744420', 's113273069'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [218, 199, 198, 203] |
p03308 | u802977614 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n=int(input())\na=list(map(int,input().split()))\nprint(abs(max(a)-min(a))', 'n=int(input())\na=list(map(int,input().split()))\nprint(abs(a.max()-a.min())', 'n=int(input())\na=list(map(int,input().split()))\nprint(abs(max(a)-min(a)))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s434317429', 's692548967', 's999435429'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 20.0] | [72, 74, 73] |
p03308 | u804880764 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["if __name__ == '__main__':\n N = int(input())\n A = list(map(int, input().split()))\n\n print(max(A) - min(B))\n", "if __name__ == '__main__':\n N = int(input())\n A = list(map(int, input().split()))\n\n print(max(A) - min(A))\n"] | ['Runtime Error', 'Accepted'] | ['s953558948', 's350102219'] | [2940.0, 2940.0] | [18.0, 17.0] | [116, 116] |
p03308 | u813174766 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['a=list(map(int,input().split()))\nprint(max(a)-min(a))', 'o=input()\na=list(map(int,input().split()))\nprint(max(a)-min(a))\n'] | ['Wrong Answer', 'Accepted'] | ['s634806112', 's299763075'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 64] |
p03308 | u815797488 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = map(int, input().split())\n\nAs = A.sort()\nans = As[len(N)-1] - As[0]\nprint(ans)', 'N = int(input())\nA = [int(i) for i in input().split()]\n\nAs = sorted(A)\nans = As[N-1] - As[0]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s613786045', 's884130610'] | [2940.0, 3316.0] | [17.0, 21.0] | [99, 103] |
p03308 | u819208902 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["if __name__ == '__main__':\n s = input()\n a = [int(i) for i in s.split()]\n mina = min(a)\n maxa = max(a)\n print(maxa - mina)\n", "\nif __name__ == '__main__':\n n = input()\n s = input()\n a = [int(i) for i in s.split()]\n mina = min(a)\n maxa = max(a)\n print(maxa - mina)\n"] | ['Wrong Answer', 'Accepted'] | ['s474543914', 's268138990'] | [2940.0, 2940.0] | [17.0, 17.0] | [138, 155] |
p03308 | u829796346 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = list(map(int,input().split()))\nmaxi = 0\nfor i in range(N-1):\n maxi = max(maxi,A[i]-A[i+1])\nprint(maxi)', 'N = int(input())\nA = map(int,input())\nmaxi = 0\nfor i in range(N-1):\n maxi = max(maxi,A[i]-A[i+1])\nprint(maxi)', 'N = int(input())\nA = list(map(int,input().split()))\nmaxi = 0\nmini = float("inf")\nfor n in A:\n maxi = max(maxi,n)\n mini = min(mini,n)\nprint(maxi-mini)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s142507518', 's670140672', 's414529636'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [124, 110, 151] |
p03308 | u835482198 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["N = int(input())\nAs = map(int, input().split())\nmax_diff = - float('inf')\nfor i in range(N):\n for j in range(i + 1, N):\n max_diff = max(max_diff, abs(As[i] - As[j]))\nprint(max_diff)\n", "N = int(input())\nAs = list(map(int, input().split()))\nmax_diff = - float('inf')\nfor i in range(N):\n for j in range(i + 1, N):\n max_diff = max(max_diff, abs(As[i] - As[j]))\nprint(max_diff)\n\n"] | ['Runtime Error', 'Accepted'] | ['s945068410', 's391682457'] | [2940.0, 3060.0] | [17.0, 19.0] | [192, 199] |
p03308 | u838296343 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["N = int(input())\nnums = list(map(int,input().split(' ')))\n\nmax = 0\nmin = 1000000000\n\nfor i in nums:\n if i>max:\n max = i\n elif i<min:\n min = i\n \nprint(max-min)\n\n", "N = int(input())\nnums = list(map(int,input().split(' ')))\n\nmax = 0\nmin = 0\n\nfor i in nums:\n if i>max:\n max = i\n elif i<min:\n min = i\n \nprint(max-min)", "N = int(input())\nnums = list(map(int,input().split(' ')))\n\nmax = 0\nmin = 1000000000\n\nfor i in nums:\n if i>max:\n max = i\n if i<min:\n min = i\n \nprint(max-min)\n\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s707874631', 's750947440', 's231768589'] | [9124.0, 9160.0, 9072.0] | [29.0, 30.0, 30.0] | [183, 172, 181] |
p03308 | u840592162 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nA = [map(int,input().split())]\nprint(max.A - min.A)', 'n = int(input())\nA = [map(int,input().split())]\nprint(max(A) - min(A))\n', 'n = int(input())\nA = list(map(int,input().split()))\nprint(max(A) - min(A))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s928551022', 's999090018', 's101761036'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [68, 71, 75] |
p03308 | u842809396 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input())\nlst=input().split()\nlst_i=[int(i) for i in lst]\na=max(lst_i)\nb=min(lst_i)\nprint(lst_i)\nprint(abs(a-b))', 'N=int(input())\na=list(map(int,input().split()))\nprint(abs(max(a)-min(a)))'] | ['Wrong Answer', 'Accepted'] | ['s597945245', 's494928182'] | [3060.0, 2940.0] | [17.0, 17.0] | [117, 73] |
p03308 | u855985627 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ["n=input()\na=[int(i) for i in input().split(' ')]\na.sort()\nprint(a[N-1]-a[0])", "n=input()\na=[int(i) for i in input().split(' ')]\na.sort()\nprint(a[-1]-a[0])"] | ['Runtime Error', 'Accepted'] | ['s879917661', 's006407231'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 75] |
p03308 | u857673087 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = input()\na = sorter(map(int,input().split()))\n\nprint(a[-1] - a[0])', 'N = input()\na = sorted(map(int,input().split()))\n\nprint(a[-1] - a[0])\n'] | ['Runtime Error', 'Accepted'] | ['s796878444', 's341387669'] | [2940.0, 2940.0] | [17.0, 18.0] | [69, 70] |
p03308 | u859210968 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = map(int,input().split())\nprint(max(A)-min(A))', 'N = int(input())\nA = map(int,input().split())\nprint(max(A)-min(A))', 'N = int(input())\nA = list(map(int,input().split()))\nprint(max(A)-min(A))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s189025636', 's551017980', 's875093005'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [66, 66, 72] |
p03308 | u864900001 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['a = list(map(int, input().split()))\nmax = 0\n\nfor i in range(len(a)-1):\n if max < abs(a[i]-a[i+1]):\n max = abs(a[i]-a[i+1])\n\nprint(max)', 'a = list(map(int, input().split()))\nprint(max(a)-min(a))', 'a = list(map(int, input().split()))\nprint(max(a)-min(a))', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min(a))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s018245557', 's200762522', 's593885829', 's454190493'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [144, 56, 56, 73] |
p03308 | u865413330 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\nl = [int(input()) for i in range(n)]\nl.sort()\nprint(abs(l[0]) - l[-1])', 'n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nprint(abs(int(l[0]) - int(l[-1])))'] | ['Runtime Error', 'Accepted'] | ['s655005644', 's863756282'] | [2940.0, 2940.0] | [18.0, 17.0] | [87, 96] |
p03308 | u870793476 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nA = list(map(int, input().split))\nprint(max(A)- min(A))', 'N = int(input())\nA = list(map(int, input().split()))\nprint(max(A)- min(A))'] | ['Runtime Error', 'Accepted'] | ['s931892232', 's305000894'] | [2940.0, 2940.0] | [18.0, 17.0] | [72, 74] |
p03308 | u875769753 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = int(input())\nls = map(int,input().split())\nprint(max(ls)-min(ls))', 'N = int(input())\nls = list(map(int,input().split()))\nprint(max(ls)-min(ls))'] | ['Runtime Error', 'Accepted'] | ['s956022710', 's882944803'] | [9076.0, 9156.0] | [25.0, 25.0] | [69, 75] |
p03308 | u876742094 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N=int(input)\nA=list(map(int,input().split()))\nA.sort()\nprint(A[-1]-A[0])\n', 'N=int(input())\nA=list(map(int,input().split()))\nmin=A[0]\nmax=A[0]\nfor i in range(N):\n if min>A[i]:\n min=A[i]\n if max<A[i]:\n max=A[i]\n\nprint(max-min)\n'] | ['Runtime Error', 'Accepted'] | ['s554845160', 's638131100'] | [9084.0, 9172.0] | [25.0, 30.0] | [73, 169] |
p03308 | u881557500 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['n = int(input())\na = map(int, input().split())\n\nmn = 10 ** 9\nmx = 0\n\nfor i in range(n):\n if a[i] < mn:\n mn = a[i]\n \n if a[i] > mx:\n mx = a[i]\n\nprint(mx - mn)', 'n = int(input())\na = [int(i) for i in input().split()]\n \nmn = 10 ** 9\nmx = 0\n \nfor i in range(n):\n if a[i] < mn:\n mn = a[i]\n \n if a[i] > mx:\n mx = a[i]\n \nprint(mx - mn)'] | ['Runtime Error', 'Accepted'] | ['s586804175', 's808164684'] | [3316.0, 3060.0] | [20.0, 17.0] | [168, 180] |
p03308 | u884531978 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['input()\nnum_list = [int(x) for x in input().split()]\n\nprint(num_list.max - num_list.min )', 'input()\nnum_list = [int(x) for x in input().split()]\n\nprint(max(num_list)- min(num_list))'] | ['Runtime Error', 'Accepted'] | ['s132097184', 's455042660'] | [2940.0, 2940.0] | [17.0, 18.0] | [89, 89] |
p03308 | u886655280 | 2,000 | 1,048,576 | You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A. | ['N = input()\nA = input()\n\nA_list = [A[i: i + 1] for i in range(0, len(A), 1)]\n\nA_list_int = list(map(int, A_list))\n\nmax = max(A_list_int)\nmin = min(A_list_int)\n\nprint(max - min)', 'N = input()\nA = input()\n\n\nA_list = []\nfor i in range(0, len(A), 1):\n A_list.append(int(A[i: i + 1]))\n\n\nA_list_int = list(map(int, A_list))\n\nmax = max(A_list_int)\nmin = min(A_list_int)\n\nprint(max - min)', 'N = input()\nA = input()\n\nA_list = [A[i: i + 1] for i in range(0, len(A), 1)]\n\nA_list_int = list(map(int, A_list))\n\nmax = max(A_list_int)\nmin = min(A_list_int)\n\nprint(max - min)', 'N = input()\nA_list = input().split()\n\nA_list_int = list(map(int, A_list))\n\nmax = max(A_list_int)\nmin = min(A_list_int)\n\nprint(max - min)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s288072809', 's508205075', 's777017249', 's077284207'] | [3060.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [176, 204, 176, 136] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.