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
|
u050708958
| 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()\nn=sorted(list(map(int,input().split())))\nprint(n[-1]- n[0])', 'input()\nn = sorted([int(i) for i in input().split()])\nprint(n[-1] - n[0])']
|
['Runtime Error', 'Accepted']
|
['s402233766', 's477826577']
|
[2940.0, 2940.0]
|
[17.0, 18.0]
|
[75, 73]
|
p03308
|
u059210959
| 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()]\nA=A.sort()\nprint(A[-1]-A[0])', '#encoding: utf-8\n\nn = int(input())\nA = [int(i) for i in input().split()]\nA.sort()\nprint(A[-1]-A[0])\n']
|
['Runtime Error', 'Accepted']
|
['s274020907', 's614201386']
|
[2940.0, 3064.0]
|
[17.0, 17.0]
|
[83, 100]
|
p03308
|
u064408584
| 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=list(map(int, input().split()))\nprint(max(a)-min(b))', 'a=int(input())\nb=list(map(int, input().split()))\nprint(max(b)-min(b))']
|
['Runtime Error', 'Accepted']
|
['s573174924', 's735290019']
|
[3316.0, 2940.0]
|
[22.0, 17.0]
|
[69, 69]
|
p03308
|
u068538925
| 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 range(100):\n if max_num < a[i]:\n max_num = a[i]\n elif min_num > a[i]:\n min_num =a[i]\n\nprint(max_num-min_num)', 'n = int(input())\na = list(map(int,input().split()))\n\nprint(max(a)-min(a))']
|
['Runtime Error', 'Accepted']
|
['s369114978', 's865937986']
|
[9140.0, 9164.0]
|
[29.0, 27.0]
|
[190, 73]
|
p03308
|
u075303794
| 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))']
|
['Runtime Error', 'Accepted']
|
['s171726208', 's234299946']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[61, 69]
|
p03308
|
u076363290
| 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 = []\nfor i in range(N):\n A.append(int(input()))\nprint(max(A)-min(A))\n', 'N = int(input())\nA = list(map(int,input().split()))\nprint(max(A)-min(A))']
|
['Runtime Error', 'Accepted']
|
['s737949589', 's620002702']
|
[9068.0, 9068.0]
|
[23.0, 27.0]
|
[91, 72]
|
p03308
|
u077337864
| 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())\nA = map(int, input().strip().split())\nmax_abs_sum = 0\nfor i in range(len(A) - 1):\n for j in (i+1, range(A)):\n if max_abs_sum < abs(A[i] - A[j]):\n max_abs_sum = abs(A[i] - A[j])\nprint(max_abs_sum)', 'N = int(input().strip())\nA = list(sorted(map(int, input().strip().split())))\n\nprint(A[-1] - A[0])']
|
['Runtime Error', 'Accepted']
|
['s089994298', 's791497317']
|
[3060.0, 2940.0]
|
[17.0, 18.0]
|
[229, 97]
|
p03308
|
u077852398
| 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 = max(a)-min(b)\nprint(b)', 'n = int(input())\na = list(map(int,input().split()))\nb = max(a)-min(b)\nprint(b)', 'n = int(input())\na = list(map(int,input().split()))\nprint(max(a)-min(a))']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s782801406', 's961592539', 's254822600']
|
[8964.0, 8972.0, 9028.0]
|
[27.0, 28.0, 28.0]
|
[78, 78, 72]
|
p03308
|
u079656139
| 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))', 'N = int(input())\nA = list(map(int, input().split()))\nB = list()\nfor i in range(N):\n B.append(abs(A[i]))\nprint(max(B)-min(B))']
|
['Wrong Answer', 'Accepted']
|
['s929797226', 's204401975']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[56, 125]
|
p03308
|
u089142196
| 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\n\nfor i in range(0,N):\n for j in range(i,N):\n ans = max(abs(i-j),ans)\n \nprint(ans)', 'N=int(input())\nA=list(map(int,input().split()))\nans=0\n\nfor i in range(0,N):\n for j in range(i,N):\n ans = max(abs(i-j))\n \nprint(ans)', 'N=int(input())\nA=list(map(int,input().split()))\nans=0\n\nfor i in range(0,N):\n for j in range(i,N):\n ans = max(abs(A[i]-A[j]),ans)\n \nprint(ans)']
|
['Wrong Answer', 'Runtime Error', 'Accepted']
|
['s003177608', 's222910415', 's608134953']
|
[2940.0, 3060.0, 2940.0]
|
[19.0, 17.0, 20.0]
|
[142, 138, 148]
|
p03308
|
u093033848
| 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 range(n)]\nprint(max(a) - min(a))\n', 'n = int(input())\na = [int(i) for i in input().split()]\nprint(max(a) - min(a))\n']
|
['Wrong Answer', 'Accepted']
|
['s612436383', 's347341084']
|
[2940.0, 2940.0]
|
[18.0, 18.0]
|
[71, 78]
|
p03308
|
u106778233
| 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.
|
['\nn = int(input())\nA = list(map(int,input().split())))\nA.sort()\nprint(abs(A[0]-A[-1]))\n\n', 'n = int(input())\nA = list(map(int,input().split()))\nA.sort()\nprint(abs(A[0]-A[-1]))']
|
['Runtime Error', 'Accepted']
|
['s657194804', 's440230991']
|
[8944.0, 9108.0]
|
[23.0, 27.0]
|
[87, 83]
|
p03308
|
u113177927
| 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\na = input()\n\nb = input().split()\nb = list(map(int, b))\nprint(max(a) - min(a))', '# -*- coding: utf-8 -*-\n\na = input()\n\nb = input().split()\nb = list(map(int, b))\nprint(max(b) - min(b))']
|
['Runtime Error', 'Accepted']
|
['s384451263', 's221927123']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[160, 160]
|
p03308
|
u113255362
| 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(map(int, input().split()))\nmid = 0\nres = 0\nfor i in range(N):\n for j range(i+1,N):\n mid = abs(List[i]-List[j])\n res = max(res,mid)\nprint(res)', 'N = int(input())\nList = list(map(int, input().split()))\nmid = 0\nres = 0\nfor i in range(N):\n for i range(i+1,N):\n mid = abs(List[i]-List[j])\n res = max(res,mid)\nprint(res)', 'N = int(input())\nList = list(map(int, input().split()))\nmid = 0\nres = 0\nfor i in range(N):\n for j in range(i+1,N):\n mid = abs(List[i]-List[j])\n res = max(res,mid)\nprint(res)']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s543479263', 's950023383', 's779430660']
|
[9020.0, 8948.0, 9084.0]
|
[22.0, 24.0, 31.0]
|
[177, 177, 180]
|
p03308
|
u117193815
| 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=list(map(int ,input().split()))\nprint((max(l)-min(l))', 'n = int(input())\nl=list(map(int ,input().split()))\nprint(max(l)-min(l))']
|
['Runtime Error', 'Accepted']
|
['s000580695', 's645381767']
|
[2940.0, 3068.0]
|
[17.0, 17.0]
|
[72, 71]
|
p03308
|
u120431259
| 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.
|
['\nN = int(input())\nprint(N)\nlist_A = [int(str_A) for str_A in input().split(" ")]\nprint(list_A)\n\nprint(max(list_A) - min(list_A))', 'N = int(input())\nlist_A = [int(str_A) for str_A in input().split(" ")]\n\nprint(max(list_A) - min(list_A))']
|
['Wrong Answer', 'Accepted']
|
['s951324008', 's809157681']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[128, 104]
|
p03308
|
u123265243
| 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 = list(map(int, input().split())\n\nprint(max(ls) - min(ls))', 'N = int(input())\nls = list(map(int, input().split()))\n\nprint(max(ls) - min(ls))\n\n']
|
['Runtime Error', 'Accepted']
|
['s514373874', 's016057558']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[78, 81]
|
p03308
|
u124762318
| 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())\nAlist = [int(i) for i in input().split()]\n\nAlist.reverse()\nprint(Alist[0]-Alist[N-1])', 'N = int(input())\nAlist = [int(i) for i in input().split()]\n\nAlist.sort()\nprint(Alist[N-1]-Alist[0])']
|
['Wrong Answer', 'Accepted']
|
['s926384319', 's359662109']
|
[2940.0, 2940.0]
|
[20.0, 17.0]
|
[102, 99]
|
p03308
|
u125269142
| 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())\nlists = list(map(int, input().split()))\n\nlists.sorted()\nprint(lists[-1] - lists[0])', 'n = int(input())\nlists = list(map(int, input().split()))\n \nlists.sort()\nprint(lists[-1] - lists[0])']
|
['Runtime Error', 'Accepted']
|
['s932333450', 's809629226']
|
[9104.0, 9160.0]
|
[29.0, 28.0]
|
[100, 99]
|
p03308
|
u138045722
| 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().split()\na=[int(x) for x in a]\nprint(a)\nt=0\nfor i in range(len(a)):\n for j in range(i+1, len(a)):\n if abs(a[i]-a[j])>t:\n t=abs(a[i]-a[j])\n \nprint(t)\n\n\n\n\n', 'N=input()\na=input().split()\na=[int(x) for x in a]\nprint(a)\nt=0\nfor i in range(len(a)-1):\n for j in range(i+1, len(a)):\n if abs(a[i]-a[j])>t:\n t=abs(a[i]-a[j])\n \nprint(t)\n\n\n\n\n', 'N=input()\na=input().split()\na=[int(x) for x in a]\n\nt=0\nfor i in range(len(a)-1):\n for j in range(i+1, len(a)):\n if abs(a[i]-a[j])>t:\n t=abs(a[i]-a[j])\n \nprint(t)\n\n\n\n\n']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s255506094', 's327509478', 's549743480']
|
[3060.0, 3060.0, 2940.0]
|
[18.0, 19.0, 18.0]
|
[200, 202, 194]
|
p03308
|
u138781768
| 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())\nnums = list(map(int, input().split())\nmax_n = 0\nmin_n = 0\nfor i in nums:\n\tif max_n < i:\n max_n = i\n if min_n > i:\n min_n =i\nprint(max_n - min_n)\n ', '_ = int(input())\nnums = list(map(int, input().split()))\nmax_n = 0\nmin_n = 100000000000000000000000\nfor i in nums:\n\tif max_n < i:\n\t\tmax_n = i\n\tif min_n > i:\n\t\tmin_n =i\nprint(max_n - min_n)\n']
|
['Runtime Error', 'Accepted']
|
['s758152801', 's314179976']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[183, 188]
|
p03308
|
u141642872
| 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\nmn = 10**9+1 \nmx = 0 \n\nfor v in A:\n if v < mn:\n mn = v \n else:\n mx = v \n\nprint(mx-mn)', 'N = int(input())\nA = list(map(int,input().split()))\nprint(max(A)-min(A))\n']
|
['Wrong Answer', 'Accepted']
|
['s143198230', 's375939364']
|
[2940.0, 2940.0]
|
[18.0, 17.0]
|
[239, 73]
|
p03308
|
u148423304
| 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()))\nM = a[0]\nm = a[0]\nfor i in range(1, n):\n if a[i] > M:\n M = a[i]\n if a[i] < m:\n m = a[i]\nprint(int(M - m))', 'n = int(input())\na = list(map(int, input().split()))\nM = a[0]\nm = a[0]\nfor i in range(1, n):\n if a[i] > M:\n M = a[i]\n if a[i] < m:\n m = a[i]\nprint(int(M - m))']
|
['Runtime Error', 'Accepted']
|
['s200730893', 's307308657']
|
[3060.0, 3060.0]
|
[18.0, 17.0]
|
[161, 166]
|
p03308
|
u152671129
| 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))']
|
['Runtime Error', 'Accepted']
|
['s833399368', 's528137355']
|
[2940.0, 2940.0]
|
[17.0, 18.0]
|
[70, 76]
|
p03308
|
u164261323
| 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 = sorted(map(int,input().split()))\nprint(s[-1]-s[0])', 'input()\ns = sorted(map(int,input().split()))\nprint(s[-1]-s[0])']
|
['Wrong Answer', 'Accepted']
|
['s760071384', 's148756045']
|
[2940.0, 2940.0]
|
[18.0, 17.0]
|
[54, 62]
|
p03308
|
u168416324
| 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.
|
['li=list(map(int,input().split()))\nprint(max(li)-min(li))', 'n=int(input())\nli=list(map(int,input().split()))\nprint(max(li)-min(li))']
|
['Wrong Answer', 'Accepted']
|
['s343576028', 's571998495']
|
[9100.0, 9156.0]
|
[25.0, 25.0]
|
[56, 71]
|
p03308
|
u173329233
| 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())\nan = input()\nan = an.split()\n\ndif = 999999999\n\nfor i in range(n-1):\n for r in range(i+1, n):\n a = int(an[i])\n b = int(an[r])\n\n abs = abs(a-b)\n if abs < dif:\n dif = abs\n\nprint(dif)\n', 'def func(a, b, c):\n \n sum_b = c*b\n sum_n = 0\n for i in range(1,c+1):\n sum_n = sum_n + i\n\n return(abs(a-sum_b-sum_n))\n\nn = int(input())\nan = input().split()\nan_sum = 0\n\nfor i in an:\n an_sum = an_sum + int(i)\n\nsad = 1000\n\nfor b in range(2*n):\n ga = func(an_sum, b, n)\n\n if ga < sad:\n sad = ga\n\nprint(sad)\n', 'n = int(input())\nan = input()\nan = an.split()\n\ndif = 10000000000\n\nfor i in range(n-1):\n for r in range(i+1, n):\n a = int(an[i])\n b = int(an[r])\n\n abs = abs(a-b)\n if abs < dif:\n dif = abs\n\nprint(dif)\n', 'n = input()\nan = input()\nan = an.split()\nlist = []\n\nfor i in an:\n i = int(i)\n list.append(i)\nmin_an = min(list)\nmax_an = max(list)\n\nprint(max_an - min_an)\n']
|
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s116455196', 's127602378', 's841618209', 's425726309']
|
[3060.0, 3064.0, 2940.0, 2940.0]
|
[18.0, 20.0, 20.0, 17.0]
|
[239, 387, 241, 161]
|
p03308
|
u175426149
| 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()))\n\nprint(max(A) - min(A))', 'N = int(input())\nA = list(map(int, input().split()))\n\nprint(max(A) - min(A))']
|
['Runtime Error', 'Accepted']
|
['s644176614', 's645810070']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[68, 76]
|
p03308
|
u177411511
| 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 sys\nfrom collections import deque\nfrom collections import Counter\nimport statistics\nimport math\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline()\n\nn = ni()\na_li = na()\nfor i in range(n):\n a_li[i] = a_li[i] - (i + 1)\nm1 = statistics.median_high(a_li)\n#m2 = statistics.median_high(a_li)\nans1 = 0\n#ans2 = 0\nfor i in range(n):\n ans1 += abs(a_li[i] - m1)\n #ans2 += abs(a_li[i] - m2)\nprint(ans1)\n', 'import sys\nfrom collections import deque\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline()\n\nn = ni()\na_li = na()\nans = -1\nfor i in range(n):\n for j in range(i+1, n):\n ans = max(ans, abs(a_li[i] - a_li[j]))\nprint(ans)']
|
['Wrong Answer', 'Accepted']
|
['s726189629', 's995332331']
|
[5512.0, 3316.0]
|
[46.0, 22.0]
|
[483, 302]
|
p03308
|
u185037583
| 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(x) for x in input().split()]\nans=0\nfor i in range(n):\n for j in range(i+1, n):\n ans=max(ans, abs(a[i]-a[j]))\nprint(ans)', 'n=input()\na=list(map(int, input().split()))\nans=0 \nfor i in range(n):\n for j in range(i+1, n):\n ans=max(ans, abs(a[i]-a[j]))\nprint(ans)', 'n=int(input())\na=[int(x) for x in input().split()]\nans=0 \nfor i in range(n):\n for j in range(i+1, n):\n ans=max(ans, abs(a[i]-a[j]))\nprint(ans)']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s703323255', 's850375156', 's941530936']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 19.0]
|
[140, 139, 146]
|
p03308
|
u186729829
| 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))', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min(a))\n']
|
['Wrong Answer', 'Accepted']
|
['s809122979', 's243308461']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[56, 74]
|
p03308
|
u187205913
| 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(len(a)):\n for j in range(i,len(a)):\n l.append(abs(a[i]-a[j]))\nprint(max(a))\n', 'n = int(input())\na = list(map(int, input().split()))\nl = []\nfor i in range(len(a)):\n for j in range(i,len(a)):\n l.append(abs(a[i]-a[j]))\nprint(max(l))']
|
['Wrong Answer', 'Accepted']
|
['s347989605', 's945235661']
|
[3188.0, 3188.0]
|
[19.0, 19.0]
|
[161, 160]
|
p03308
|
u188366988
| 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()\na=sorted(map(int,input().split()))\nprint(a[-1]-a[1])\n', 'import numpy as npo\na=input()\na=(map(int,input().split()))\na=npo.array(a)\na=npo.sort()\nprint(a[-1]-a[0])\n\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\n', 'a=input()\na=sorted(map(int,input().split()))\nprint(a[-1]-a[1])\n\n', 'import numpy as npo\na=input()\na=(map(int,input().split()))\na=npo.array(a)\na=npo.sort.()\nprint(a[-1]-a[0])\n\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")\nprint("")', 'import numpy\na=input()\na=list((map(int,input().split())))\na=numpy.array(a)\na=numpy.sort(a)\nprint(a[-1]-a[0])\n']
|
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s004761179', 's167483939', 's383066898', 's966059635', 's689326685']
|
[2940.0, 13228.0, 2940.0, 2940.0, 20512.0]
|
[17.0, 159.0, 17.0, 17.0, 276.0]
|
[63, 306, 64, 306, 109]
|
p03308
|
u190866453
| 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())\n\nlist.sort()\n\nanswer = list[-1] - list[0]\n\nprint(answer)', 'n = int(input())\nx = list(map(int, input().split()))\n\nx.sort()\n\nanswer = x[-1] - x[0]\n\nprint(answer)']
|
['Runtime Error', 'Accepted']
|
['s224630508', 's385987235']
|
[9168.0, 9064.0]
|
[25.0, 28.0]
|
[105, 100]
|
p03308
|
u202570162
| 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(i) for i in input().split()]\nd_list =[]\n\nfor i in range(n):\n\tfor j in range(n-i):\n\t\tprint(i,n-j-1)\n\t\td_list.append(abs(a_list[i]-a_list[n-j-1]))\n\t\t\nprint(max(d_list))', 'n = int(input())\na_list = [int(i) for i in input().split()]\nd_list =[]\n\nfor i in range(n):\n\tfor j in range(n-i):\n\t\t# print(i,n-j-1)\n\t\td_list.append(abs(a_list[i]-a_list[n-j-1]))\n\t\t\nprint(max(d_list))']
|
['Wrong Answer', 'Accepted']
|
['s774716912', 's287997297']
|
[3736.0, 3188.0]
|
[24.0, 19.0]
|
[197, 199]
|
p03308
|
u204800924
| 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()\nrange = 0\n\nfor i in range(N+1):\n for j in range(i+1,N+1):\n x = A[j]-A[i]\n range = max([range,x])\n\nprint(range)\n', 'N = int(input())\nA = list(map(int, input().split()))\nA.sort()\n\n# range=A[N-1]-A[0]\n\nrange = 0\n\nfor i in range(N):\n for j in range(i+1,N):\n x = A[j]-A[i]\n range = max([range,x])\n\nprint(range)\n', 'N = int(input())\nA = list(map(int, input().split()))\nA.sort()\n\nrange=A[N-1]-A[0]\n\nprint(range)\n']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s070915198', 's634854426', 's429184979']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 18.0, 17.0]
|
[190, 208, 95]
|
p03308
|
u210827208
| 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()))\n\n\n\nprint(max(A)-min(A))', 'n=int(input())\n\nA=list(map(int,input().split()))\n\n\n\nprint(max(A)-min(A))']
|
['Runtime Error', 'Accepted']
|
['s080930692', 's183226405']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[64, 72]
|
p03308
|
u221345507
| 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(A)-min(A)', 'N=int(input())\nA=list(map(int, input().split()))\nprint(max(A)-min(A))']
|
['Wrong Answer', 'Accepted']
|
['s960338938', 's808600636']
|
[2940.0, 3064.0]
|
[17.0, 17.0]
|
[62, 69]
|
p03308
|
u221940831
| 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.
|
['num_len = int(input())\nnumbers = list(map(int, input().split()))\nprint(max(numbers) - min(numbers)', 'num_len = int(input())\nnumbers = list(map(int, input().split()))\nprint(max(numbers) - min(numbers))']
|
['Runtime Error', 'Accepted']
|
['s794126335', 's626879684']
|
[8932.0, 9112.0]
|
[30.0, 24.0]
|
[98, 99]
|
p03308
|
u224156735
| 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)-max(B))', 'N=int(input())\nA=list(map(int,input().split()))\nm1=max(A)\nm2=min(A)\nprint(m1-m2)']
|
['Runtime Error', 'Accepted']
|
['s108081112', 's689168587']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[68, 80]
|
p03308
|
u226108478
| 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\n\n\nif __name__ == '__main__':\n n = int(input())\n\n if n % 2 == 0:\n print(n)\n else:\n print(n * 2)\n", "# -*- coding: utf-8 -*-\n\n\ndef main():\n n = int(input())\n a = list(map(int, input().split()))\n print(max(a) - min(a))\n\n\nif __name__ == '__main__':\n main()\n"]
|
['Wrong Answer', 'Accepted']
|
['s770242374', 's609312299']
|
[2940.0, 3064.0]
|
[17.0, 17.0]
|
[169, 166]
|
p03308
|
u228636605
| 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(i) for i in input().split())\nA = list(int(i) for i in range(input().split(),N))\n\nprint(max(A) - min(A))', 'N = int(input())\nA = list(map(int, input().split()))\n\nprint(max(A) - min(A))']
|
['Runtime Error', 'Accepted']
|
['s345302274', 's130192160']
|
[3064.0, 2940.0]
|
[17.0, 17.0]
|
[114, 77]
|
p03308
|
u231905444
| 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())\narr=list(map(int,input().split()))\nprint(abs(arr[-1]-arr[0]))', 'n=int(input())\narr=list(map(int,input().split()))\narr.sort()\nprint(abs(arr[-1]-arr[0]))']
|
['Wrong Answer', 'Accepted']
|
['s712496306', 's659704253']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[76, 87]
|
p03308
|
u236536206
| 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()))\nd=[]\nimport itertools\nfor v in itertools.combinations(a,2):\n #print(v)\n d.append(abs(v[0]-v[1]))\nprint(min(d))', 'n=int(input())\na=list(map(int,input().split()))\nd=[]\nimport itertools\nfor v in itertools.combinations(a,2):\n #print(v)\n d.append(abs(v[0]-v[1]))\nprint(max(d))']
|
['Wrong Answer', 'Accepted']
|
['s198604478', 's057915979']
|
[3188.0, 3188.0]
|
[19.0, 19.0]
|
[164, 164]
|
p03308
|
u239528020
| 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 python3\n\nn = int(input())\na = list(map(int, input().split()))\n\nans = 0\nfor i in range(len(a)-1):\n ans = max(ans, abs(a[i]-a[i+1]))\n\nprint(ans)\n', '#!/usr/bin/env python3\n\nn = int(input())\na = list(map(int, input().split()))\n\nans = max(a) - min(a)\n\nprint(ans)\n']
|
['Wrong Answer', 'Accepted']
|
['s601476994', 's249933148']
|
[9048.0, 8884.0]
|
[29.0, 32.0]
|
[161, 112]
|
p03308
|
u242518667
| 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(map(int,input()))\nprint(a[-1]-a[0])', 'n=int(input())\na=sorted(map(int,input()))\nprint(a[:-1]-a[0])', 'n=int(input())\na=sorted(map(int,input().split()))\nprint(a[-1]-a[0])']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s606416679', 's644737039', 's780722977']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0]
|
[59, 60, 67]
|
p03308
|
u251123951
| 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(n-1):\n if abs(a[i]-a[i+1])>max:\n max=abs(a[i]-a[i+1])\nprint(max)', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nprint(a[-1]-a[0])']
|
['Wrong Answer', 'Accepted']
|
['s962447435', 's082424362']
|
[2940.0, 2940.0]
|
[18.0, 18.0]
|
[137, 74]
|
p03308
|
u253952966
| 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().split())\nan = list(map(int, input().split()))\nprint(max(an) - min(an))', 'n = int(input())\nan = list(map(int, input().split()))\nprint(max(an) - min(an))']
|
['Runtime Error', 'Accepted']
|
['s200984798', 's650386596']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[86, 78]
|
p03308
|
u273010357
| 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 = map(int,input().split())\nli.sort()\nprint(abs(li[-1]-li[0]))', 'N = int(input())\nA = list(map(int,input().split()))\nprint(abs(max(A)-min(A)))']
|
['Runtime Error', 'Accepted']
|
['s410106575', 's222246299']
|
[2940.0, 2940.0]
|
[17.0, 18.0]
|
[81, 77]
|
p03308
|
u284999381
| 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 = -100\nfor i in range(N):\n for j in range(i, N):\n s = abs(A[i] - A[j])\n ans = max(ans, s)\nprint(ans)\n ', 'N = int(input())\nA = list(map(int,input().split())\nans = 0\nfor i in range(N):\n for j in range(i, N):\n s = abs(A[i] - A[j])\n ans = max(ans, s)\nprint(ans)', 'N = int(input())\nA = list(map(int,input().split())\nans = -100\nfor i in range(N):\n for j in range(i, N):\n s = abs(A[i] - A[j])\n ans = max(ans, s)\nprint(ans)', 'N = int(input())\nA = list(map(int,input().split()))\nans = -100\nfor i in range(N):\n for j in range(i, N):\n s = abs(A[i] - A[j])\n ans = max(ans, s)\nprint(ans)']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s584579884', 's783571145', 's887364198', 's902262774']
|
[2940.0, 2940.0, 2940.0, 3060.0]
|
[17.0, 19.0, 17.0, 19.0]
|
[184, 159, 162, 173]
|
p03308
|
u290211456
| 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(input()) for i in range(n)]\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 = int(input())\na = [int(input) for i in range(n)]\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 = 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))']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s702999114', 's997692012', 's498246057']
|
[3060.0, 3060.0, 3188.0]
|
[17.0, 18.0, 19.0]
|
[198, 196, 197]
|
p03308
|
u292735000
| 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())\n \na_sorted = sorted(a_list)\n \nprint(a_sorted[-1] - a_sorted[0]', 'n = int(input())\na_list = list(map(int, input().split())\n \na_sorted = sorted(a_list)\n \nprint(a_sorted[-1] - a_sorted[0])', 'n = int(input())\na_list = list(map(int, input().split()))\n \na_sorted = sorted(a_list)\n \nprint(a_sorted[-1] - a_sorted[0])']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s129437473', 's727860118', 's444230874']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0]
|
[145, 146, 147]
|
p03308
|
u292814514
| 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=input().split()\nprint(max(num)-min(num))', 'n=int(input())\nnum=input.split()\nprint(num.max()-num.min())', 'n=int(input())\nnum=int(input().split())\nprint(max(num)-min(num))', 'n=int(input())\nnum_str=input().split()\nnum=list(map(int, num_str))\nprint(max(num)-min(num))\n']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s191679361', 's207966769', 's908299429', 's428353186']
|
[2940.0, 2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0, 17.0]
|
[59, 59, 64, 92]
|
p03308
|
u294394140
| 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 = a.sort()\nans = a[-1] - a[0]\nprint(ans)', 'n = int(input())\na = map(int, input().split())\na.sort()\nans = a[-1] - a[0]\nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\na.sort()\nans = a[-1] - a[0]\nprint(ans)\n']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s909604337', 's937280503', 's587849992']
|
[9152.0, 9144.0, 8964.0]
|
[24.0, 23.0, 30.0]
|
[95, 85, 92]
|
p03308
|
u295457032
| 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.
|
['H = list(map(int, input().split())\nprint(max(H)-min(H))', 'N = list(map(int, input().split()))\nprint(max(N)-min(N))', 'N = int(input())\nA = list(map(int, input().split()))\nprint(max(A)-min(A))']
|
['Runtime Error', 'Wrong Answer', 'Accepted']
|
['s228627638', 's525990040', 's740903405']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0]
|
[55, 56, 73]
|
p03308
|
u295621316
| 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()\nl = input().split()\nl = map(int, l)\nmax, min = max(l), min(l)\nprint(max - min)', 'n = input()\nl = input().split()\nl = list(map(int, l))\nmax, min = max(l), min(l)\nprint(max-min)']
|
['Runtime Error', 'Accepted']
|
['s967275093', 's970861113']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[90, 94]
|
p03308
|
u296101474
| 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 = [int(i) for i in input.split()]\n\nmax_num = max(b)\nmin_num = min(b)\n\nprint(max_num - min_num)', 'a = int(input())\nb = [int(i) for i in input().split()]\n\nmax_num = max(b)\nmin_num = min(b)\n\nprint(max_num - min_num)\n']
|
['Runtime Error', 'Accepted']
|
['s441056044', 's276178501']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[113, 116]
|
p03308
|
u299869545
| 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', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min(a))\n']
|
['Runtime Error', 'Accepted']
|
['s010953852', 's570735294']
|
[2940.0, 3064.0]
|
[17.0, 17.0]
|
[68, 74]
|
p03308
|
u300465687
| 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()\nu = list(map(int,input().split())).sort()\nprint(u[-1] - u[0])', '_ = input()\nk = input()\nu = list(map(int,k.split()))\nu.sort()\nprint(u[-1] - u[0])']
|
['Runtime Error', 'Accepted']
|
['s383317612', 's918305318']
|
[2940.0, 2940.0]
|
[17.0, 19.0]
|
[73, 81]
|
p03308
|
u311669106
| 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())\nln=map(int,input().split())\nprint(abs(max(ln)-min(ln)+1))', 'n=int(input())\nln=[int(n) for n in map(int,input().split())]\nprint(max(ln)-max(ln))', 'n=int(input())\nln=map(int,input().split())\nprint(abs(max(ln)-min(ln)))', 'n=int(input())\nln=[int(a) for a in input().split()]\nprint(abs(max(ln)-min(ln)))']
|
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s499741375', 's693022469', 's920605919', 's983956166']
|
[2940.0, 2940.0, 2940.0, 2940.0]
|
[17.0, 19.0, 17.0, 17.0]
|
[72, 83, 70, 79]
|
p03308
|
u317711717
| 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 math\n\na=map(int,input().split())\n\na.sort()\n\nprint(a[-1]-a[0])\n', 'import math\nn=input()\na=map(int,input().split())\n\na.sort()\n\nprint(a[-1]-a[0])\n', 'import math\n\nn=input()\na=sorted(map(int,input().split()))\n\n\nprint(a[-1]-a[0])\n']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s090083235', 's160646024', 's101445686']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0]
|
[69, 78, 78]
|
p03308
|
u318029285
| 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().spllit()))\nprint(max(A) - min(A))\n', 'N = int(input())\nA = list(map(int, input().split()))\nprint(max(A) - min(A))']
|
['Runtime Error', 'Accepted']
|
['s562647525', 's782029989']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[77, 75]
|
p03308
|
u319690708
| 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\nA_s = set(A)\nA.sort()\nA.reverse()\n\na1 = A[0]\na2 = A[1]\n\n\nprint(a1-a2)\n', 'N = int(input())\n\nA=list(map(int, input().split()))\n\nA_s = set(A)\nA.sort()\nA.reverse()\n\na1 = A[0]\na2 = A[-1]\n\n\nprint(a1-a2)\n']
|
['Wrong Answer', 'Accepted']
|
['s874745858', 's819483404']
|
[2940.0, 2940.0]
|
[17.0, 19.0]
|
[123, 124]
|
p03308
|
u320325426
| 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())\nnl = sorted(list(map(int, input().split())), reverse=True)\nprint(nl[0] - nl[1])', 'input()\nnl = sorted([int(i) for i in input().split()])\nprint(abs(nl[-1] - nl[0]))']
|
['Wrong Answer', 'Accepted']
|
['s866364394', 's901992168']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[96, 81]
|
p03308
|
u325227960
| 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)\nprint(str(A[n-1]-A[0]))\n', 'n=int(input())\nA=list(map(int,input().split()))\nA.sort()\n#print(A)\nprint(str(A[n-1]-A[0]))\n']
|
['Wrong Answer', 'Accepted']
|
['s484718508', 's627292213']
|
[3068.0, 2940.0]
|
[19.0, 17.0]
|
[90, 91]
|
p03308
|
u326261815
| 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.
|
['count=input()\nlist=input().rstrip().split(" ")\nsa = int(list[0])-int(list[1])\nfor i in range(len(list)):\n if sa<(int(list[i-1])-int(list[i])):\n sa=(int(list[i-1])-int(list[i]))\nif sa<0:\n print(-1*sa)\nelse:\n print(sa)', 'count=input()\nlist=int(input()).rstrip().split(" ")\nlist2= sorted(list)\nsa=(int(list2[0])-int(list2[int(count)-1]))\nif sa<0:\n print(-1*int(sa))\nelse:\n print(int(sa))', 'count=input()\nlist=input().rstrip().split(" ")\nlist_1=[int(s) for s in list]\nsa=(max(list_1)-min(list_1))', 'count=input()\nlist=input().rstrip().split(" ")\nlist_1=[int(s) for s in list]\nlist2= sorted(list_1)\nsa=(max(list2)-min(list2))', 'count=input()\nlist=input().rstrip().split(" ")\nlist_1=[int(s) for s in list]\nlist2= sorted(list_1)\nsa=(max(list2)-min(list2))', 'count=input()\nlist=input().rstrip().split(" ")\nlist_1=[int(s) for s in list]\nlist2= sorted(list_1)\nsa=(max(list2)-min(list2))', 'count=input()\nlist=int(input()).rstrip().split(" ")\nlist_1=[int(s) for s in list]\nlist2= sorted(list_1)\nsa=(int(list2[0])-int(list2[int(count)-1]))\nif sa<0:\n print(-1*int(sa))\nelse:\n print(int(sa))', 'count=input()\nlist=input().rstrip().split(" ")\nlist_1=[int(s) for s in list]\nlist2= sorted(list_1)\nsa=(max(list2)-min(list2))\nif sa<0:\n print(-1*sa)\nelse:\n print(sa)']
|
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s424624689', 's574261337', 's578103702', 's668240845', 's732481169', 's740843704', 's881362534', 's900917456']
|
[9188.0, 9176.0, 9140.0, 9100.0, 9104.0, 9076.0, 8996.0, 9088.0]
|
[29.0, 24.0, 25.0, 28.0, 26.0, 27.0, 27.0, 27.0]
|
[222, 167, 105, 125, 125, 125, 199, 167]
|
p03308
|
u329049771
| 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.
|
['4\n1 4 6 3', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)-min(a))']
|
['Runtime Error', 'Accepted']
|
['s560076632', 's797188277']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[9, 73]
|
p03308
|
u329058683
| 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', 'N=int(input())\nA=list(map(int,input().split()))\nprint(max(A)-min(A))']
|
['Runtime Error', 'Accepted']
|
['s471272233', 's752961968']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[65, 68]
|
p03308
|
u331036636
| 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(abs(min(A)-max(A)))']
|
['Wrong Answer', 'Accepted']
|
['s519898378', 's354107971']
|
[2940.0, 3060.0]
|
[17.0, 20.0]
|
[1, 72]
|
p03308
|
u340781749
| 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, aaa = map(int, open(0).split())\nprint(max(aaa) - min(aaa))', 'n, *aaa = map(int, open(0).read().split())\nprint(max(aaa) - min(aaa))']
|
['Runtime Error', 'Accepted']
|
['s370460822', 's884992494']
|
[9036.0, 9124.0]
|
[24.0, 26.0]
|
[61, 69]
|
p03308
|
u346194435
| 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=[]\nfor i in range(n):\n a.append(int(input()))\n\nprint(max(a) - min(a))', 'n=int(input())\na=[int(i) for i in input().split()]\n\nprint(max(a) - min(a))']
|
['Runtime Error', 'Accepted']
|
['s814368317', 's454881141']
|
[2940.0, 2940.0]
|
[18.0, 18.0]
|
[89, 74]
|
p03308
|
u350093546
| 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', 'n=int(input())\na=map(int,input().split()\nprint(max(a)-min(a))\n', 'n=int(input())\na=list(map(int,input().split())\na.sort()\nprint(a[-1]-a[0])', 'n=int(input())\na=list(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=int(input())\na=list(map(int,input().split()))\nprint(max(a)-min(a))\n']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s014040930', 's082929439', 's457157790', 's727197951', 's795056281', 's978450165']
|
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0, 16.0, 17.0, 17.0]
|
[64, 62, 73, 68, 67, 69]
|
p03308
|
u352676541
| 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\nAmax = max(A)\nAmin = min(A)\n\nans = Amax - Amin\nprint(ans)', 'N = int(input())\nA = list(map(int,input().split()))\n\ndiffmax = 0\nfor i in range(N):\n\tfor j in range(1,N):\n\t\tdiff = abs(A[i]-A[j])\n\t\tif diff > diffmax:\n\t\t\tdiffmax = diff\nprint(diffmax)']
|
['Runtime Error', 'Accepted']
|
['s411996300', 's270649941']
|
[9016.0, 9096.0]
|
[25.0, 29.0]
|
[109, 183]
|
p03308
|
u354918239
| 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 = []\n\nN = int(input())*N\n\nfor i in range(0, N) :\n a = int(input())\n A.append(a)\n \n\nprint(max(A) - min(A))', 'A = []\n\nN = int(input())\n\nfor i in range(0, N) :\n a = int(input())\n A.append(a)\n \n\nprint(max(A) - min(A))', 'A = []\n\nN = int(input())\nif N in range(1,100) :\n for i in range(1, N+1) :\n a = int(input())\n if a in range(1,int(10e8)) :\n A.append(a)\n \nma = max(A)\nmi = min(A)\n\nprint(ma - mi)', 'N = int(input())\nA = []\nfor i in range(1, N+1) :\n a = int(input())\n A.append(a)\nprint(A)\n\nma = max(A)\nmi = min(A)\n\nprint(ma - mi)', 'N = int(input())\nA = []\nfor i in range(1, N+1) :\n a = int(input())\n A.append(a)\n\nma = max(A)\nmi = min(A)\n\nprint(ma - mi)', 'n = int(input())\nA = input().split()\nfor i in range(len(A)) :\n A[i] = int(A[i])\nprint(max(A)-min(A))']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s025084566', 's451092282', 's691817524', 's876246987', 's896477982', 's386876317']
|
[2940.0, 2940.0, 3060.0, 3060.0, 3060.0, 2940.0]
|
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
|
[116, 114, 207, 135, 126, 103]
|
p03308
|
u359474860
| 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()]\nb = []\nfor i in range(n):\n b.append(abs(int(a[i-1]) - int(a[i])))\nprint(max(b))', 'n = int(input())\na = [int(i) for i in input().split()]\nprint(max(a) - min(a))']
|
['Wrong Answer', 'Accepted']
|
['s645627401', 's731736573']
|
[2940.0, 2940.0]
|
[18.0, 18.0]
|
[137, 77]
|
p03308
|
u361826811
| 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\nimport sys\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nsys.setrecursionlimit(10 ** 7)\n\nN = int(readline().rstrip())\nlis = list(map(int, readline().rstrip().split()))\nsorted(lis)\n\nprint(lis[-1]-lis[0])\n', '\n\nimport sys\n\n# import itertools\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nN, *A = map(int, read().split())\nA.sort()\nprint(A[-1]-A[0])\n']
|
['Wrong Answer', 'Accepted']
|
['s093136443', 's781723049']
|
[3060.0, 2940.0]
|
[17.0, 17.0]
|
[266, 299]
|
p03308
|
u365364616
| 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())).sort()\nprint(a[-1] - a[0])', 'N = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(a[-1] - a[0])']
|
['Runtime Error', 'Accepted']
|
['s280873522', 's519322591']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[79, 81]
|
p03308
|
u366644013
| 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(input()) for i in range(n)]\na.sort()\nprint(a[-1] - a[0])', 'n = int(input())\na = [int(input()) for i in range(n)]\na.sort()\nprint(a[-1] - a[0])', 'n = int(input())\na = [int(input()) for i in range(n)]\na.sort()\nprint(a[-1] - a[0])', 'n = int(input())\na = [int(i) for i in input().split()]\na.sort()\nprint(a[-1] - a[0])']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s137885043', 's371582815', 's627633933', 's382921571']
|
[2940.0, 2940.0, 2940.0, 3060.0]
|
[17.0, 18.0, 17.0, 93.0]
|
[82, 82, 82, 83]
|
p03308
|
u371467115
| 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-1]=a[0])', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nprint(a[n-1]-a[0])']
|
['Runtime Error', 'Accepted']
|
['s188056669', 's878246997']
|
[2940.0, 2940.0]
|
[18.0, 18.0]
|
[75, 75]
|
p03308
|
u373047809
| 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 = sorted(map(int, input().split()))\nprint(a[0]-a[-1])', '_ = input()\na = sorted(map(int, input().split()))\nprint(a[-1]-a[0])']
|
['Wrong Answer', 'Accepted']
|
['s814785360', 's830933086']
|
[2940.0, 2940.0]
|
[18.0, 17.0]
|
[67, 67]
|
p03308
|
u377158682
| 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 B():\n n = int(input())\n a = input().split()\n \n if(len(a) != n):\n exit(1)\n\n i_max = 0\n i_min = 1000000001\n for i in a:\n k = int(i)\n if (i_max < k):\n i_max = k\n if (i_min > k):\n i_min = k\n print(i_max,i_min)\n print(abs( i_max - i_min))\n\nif __name__ =='__main__':\n B()", "def B():\n n = int(input())\n a = input().split()\n \n if(len(a) != n):\n exit(1)\n\n i_max = 0\n i_min = 1000000001\n for i in a:\n k = int(i)\n if (i_max < k):\n i_max = k\n if (i_min > k):\n i_min = k\n print(i_max,i_min)\n print(abs( i_max - i_min))\n\nif __name__ =='__main__':\n B()", "\ndef B():\n n = int(input())\n a = input().split()\n \n if(len(a) != n):\n exit(1)\n\n i_max = 0\n i_min = 1000000001\n for i in a:\n k = int(i)\n if (i_max < k):\n i_max = k\n if (i_min > k):\n i_min = k\n print(abs( i_max - i_min))\n\nif __name__ =='__main__':\n B()"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s159028555', 's556002428', 's022222373']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[357, 357, 335]
|
p03308
|
u382431597
| 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 sys\nn = int(input())\na = list(map(int, input().split())).sorted()\nprint(a[n-1] - a[0])', 'import sys\nn = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(a[n-1] - a[0])']
|
['Runtime Error', 'Accepted']
|
['s051031541', 's781207765']
|
[3316.0, 2940.0]
|
[21.0, 17.0]
|
[93, 93]
|
p03308
|
u383450070
| 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(input()) for i in range(n)]\nprint(max(lst)-min(lst))', 'n=int(input())\nlst=list(map(int,input().split()))\nprint(max(lst)-min(lst))']
|
['Runtime Error', 'Accepted']
|
['s759390235', 's652567797']
|
[3056.0, 2940.0]
|
[17.0, 17.0]
|
[76, 74]
|
p03308
|
u390694622
| 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()))\nmini=maxi=a[0]\nfor i in range(1,N):\n mini=min(mini,a[i])\n maxi=max(maxi,a[i])\nprint(maxi-mini)', 'N=int(input())\na=list(map(int,input().split()))\nmini=maxi=a[0]\nfor i in range(1,N):\n mini=min(mini,a[i])\n maxi=max(maxi,a[i])\nprint(maxi-mini)']
|
['Runtime Error', 'Accepted']
|
['s492960216', 's957064470']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[139, 144]
|
p03308
|
u391589398
| 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 = tuple(map(int, input().split()))\nprint(max(A) - min(A)', 'N = int(input())\nA = tuple(map(int, input().split()))\nprint(max(A) - min(A))']
|
['Runtime Error', 'Accepted']
|
['s387987748', 's013433753']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[75, 76]
|
p03308
|
u405256066
| 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.
|
['from sys import stdin\ndata=[int(x) for x in stdin.readline().rstrip().split()]\ndata=sorted(data)\nprint(abs(data[0]-data[-1]))', 'from sys import stdin\ndata=[int(x) for x in stdin.readline().rstrip().split()]\ndata=sorted(data)\nprint(abs(data[0]-data[-1])', 'from sys import stdin\nN=int(stdin.readline().rstrip())\ndata=[int(x) for x in stdin.readline().rstrip().split()]\ndata=sorted(data)\nprint(abs(data[0]-data[-1]))']
|
['Wrong Answer', 'Runtime Error', 'Accepted']
|
['s300716944', 's877119162', 's736639000']
|
[2940.0, 3064.0, 2940.0]
|
[18.0, 17.0, 18.0]
|
[125, 124, 158]
|
p03308
|
u409757418
| 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())\nais = list(map(int, input().split()))\na_mini = ais[0]\na_max = ais[0]\nfor i in rnage(1, n):\n if ais[i] < a_mini:\n a_mini = ais[i]\n if ais[i] > a_max:\n a_max = ais[i]\nprint(a_max - a_mini)', 'n = int(input())\nais = list(map(int, input().split()))\na_mini = ais[0]\na_max = ais[0]\nfor i in range(1, n):\n if ais[i] < a_mini:\n a_mini = ais[i]\n if ais[i] > a_max:\n a_max = ais[i]\nprint(a_max - a_mini)']
|
['Runtime Error', 'Accepted']
|
['s403794256', 's145426272']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[211, 211]
|
p03308
|
u430223993
| 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.
|
['x = [int(i) for i in input().split()]\nseq = x[1:]\nprint(max(seq)-min(seq))', 'x = int(input())\nseq = [int(i) for i in input().split()]\nprint(max(seq)-min(seq))']
|
['Runtime Error', 'Accepted']
|
['s075646774', 's284262074']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[74, 81]
|
p03308
|
u433780933
| 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(num) for num in input().split()]\nm = 0\nfor i in range(n):\n for j in range(n):\n m = max(max,abs(a[i]-a[j]))\nprint(m)', 'n = int(input())\na = [int(num) for num in input().split()]\nm = 0\nfor i in range(n):\n for j in range(n):\n m = max(m,abs(a[i]-a[j]))\nprint(m)']
|
['Runtime Error', 'Accepted']
|
['s788614738', 's029362802']
|
[2940.0, 2940.0]
|
[18.0, 21.0]
|
[145, 143]
|
p03308
|
u434500430
| 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(input()) for i in range(N)]\nAmin = min(A)\nAmax = max(A)\nprint(abs(Amax-Amin))', 'N = int(input())\nA = list(map(int, input().split()))\nAmin = min(A)\nAmax = max(A)\nprint(abs(Amax-Amin))']
|
['Runtime Error', 'Accepted']
|
['s306688443', 's065404260']
|
[3064.0, 2940.0]
|
[17.0, 17.0]
|
[103, 102]
|
p03308
|
u437215432
| 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.
|
['mport numpy as np\nn = int(input())\na = [int(input()) for x in range(n)]\nprint(np.amax(abs(np.subtract.outer(a, a))))\n', 'import numpy as np\nn = int(input())\na = [int(x) for x in input()]\nprint(np.amax(abs(np.subtract.outer(a, a))))\n', '# ABC102B\n\nimport numpy as np\nn = int(input())\na = [int(x) for x in input().split()]\nprint(np.amax(abs(np.subtract.outer(a, a))))\n']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s898629669', 's924515909', 's646192430']
|
[2940.0, 12428.0, 12664.0]
|
[17.0, 148.0, 150.0]
|
[117, 111, 130]
|
p03308
|
u439063038
| 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\nmx_diff = 0\nfor i in range(1, N):\n if abs(a[i-1]-a[i]) > mx_diff:\n mx_diff = abs(a[i-1]-a[i])\nprint(mx_diff)', 'N = int(input())\na = list(map(int, input().split()))\n\nmx_a = 1\nmn_a = 10**9\nfor i in range(N):\n if a[i] > mx_a:\n mx_a = a[i]\n if a[i] < mn_a:\n mn_a = a[i]\nprint(mx_a-mn_a)\n']
|
['Wrong Answer', 'Accepted']
|
['s935884002', 's332502865']
|
[9008.0, 9144.0]
|
[25.0, 26.0]
|
[172, 192]
|
p03308
|
u440129511
| 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(input()) for _ in range(n)]\nprint(max(a)-min(a))\n', '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', 'Runtime Error', 'Accepted']
|
['s520063196', 's850492475', 's999606880', 's668464666']
|
[2940.0, 2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0, 18.0]
|
[71, 62, 64, 68]
|
p03308
|
u440191278
| 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 sys\n\ndef solve(n, lst_a):\n a=1\n b=1 \n for i in as1:\n if a <i:\n a=i\n elif b>i:\n b=i\n return a-b\n\ndef readQuestion():\n line1 = sys.stdin.readline().rstrip()\n n = int(line1)\n line2 = sys.stdin.readline().rstrip()\n lst_a = [int(s) for s in line2.split(' ')]\n return (n, lst_a)\n\ndef main():\n n, lst_ab = readQuestion()\n answer = solve(n, lst_ab)\n print(answer)\n \nif __name__ == '__main__':\n main()", "import sys\n\ndef solve(n, lst_a):\n a=lst_a[0]\n b=lst_a[0]\n [0]\n for i in lst_a:\n if a <i:\n a=i\n elif b>i:\n b=i\n return a-b\n\ndef readQuestion():\n line1 = sys.stdin.readline().rstrip()\n n = int(line1)\n line2 = sys.stdin.readline().rstrip()\n lst_a = [int(s) for s in line2.split(' ')]\n return (n, lst_a)\n\ndef main():\n n, lst_ab = readQuestion()\n answer = solve(n, lst_ab)\n print(answer)\n \nif __name__ == '__main__':\n main()"]
|
['Runtime Error', 'Accepted']
|
['s305043700', 's372034095']
|
[3188.0, 3064.0]
|
[18.0, 17.0]
|
[480, 500]
|
p03308
|
u441320782
| 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.
|
['x = sorted(map(int,input().split()))\nprint(abs(x[-1]-x[0]))', 'N = int(input())\nx = sorted(map(int,input().split()))\nprint(abs(x[-1]-x[0]))']
|
['Wrong Answer', 'Accepted']
|
['s635329460', 's570825576']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[59, 76]
|
p03308
|
u447342168
| 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 = [int(i) for i in input().split()]\nprint(list)\nprint(max(list) - min(list))', 'N = int(input())\nlist = [int(i) for i in input().split()]\nprint(max(list) - min(list))']
|
['Wrong Answer', 'Accepted']
|
['s193944249', 's929676261']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[99, 87]
|
p03308
|
u452015170
| 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 = []\nfor _ in range(n) :\n a += [int(input())]\nprint(max(a)- min(a))', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a)- min(a))']
|
['Runtime Error', 'Accepted']
|
['s546270572', 's590999164']
|
[2940.0, 2940.0]
|
[18.0, 17.0]
|
[89, 74]
|
p03308
|
u468972478
| 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', 'n = int(input())\na = list(map(int, input().split()))\nprint(max(a) - min(a))\n']
|
['Runtime Error', 'Accepted']
|
['s261566864', 's752083778']
|
[9156.0, 9072.0]
|
[25.0, 24.0]
|
[70, 76]
|
p03308
|
u469893324
| 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,raw_input().split())\n\namax = (max(a))\namin = (min(a))\n\nres = abs(amax-amin)\nprint res ', 'N = int(input())\na = map(int,raw_input().split())\n\namax = (max(a))\namin = (min(a))\n\nres = abs(amax-amin)\nprint (res) ', 'N = int(input())\n\na = list(map(int,input().split()))\n\namax = (max(a))\namin = (min(a))\n\nres = abs(amax-amin)\nprint (res)']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s098963467', 's619280833', 's990914520']
|
[2940.0, 3060.0, 3064.0]
|
[18.0, 17.0, 18.0]
|
[115, 117, 119]
|
p03308
|
u476048753
| 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_lists = list(map(int, input().split))\nans = 0\n\nfor i in num_lists:\n for j in num_lists:\n diff = abs(i - j)\n if diff > ans:\n ans = diff\n\nprint(ans)', 'N = int(input())\nnum_lists = list(map(int, input().split))\nans = - 1\n\nfor i in num_lists:\n for j in num_lists:\n diff = abs(i - j)\n if diff > ans:\n ans = diff\n\nprint(ans)', 'N = int(input())\nnum_lists = list(map(int, input().split))\nmax_num = max(num_lists)\nmin_num = min(num_lists)\nans = max_num - min_num\nprint(ans)', 'N = int(input())\nnum_lists = list(map(int, input().split()))\nans = 0\n \nfor i in num_lists:\n for j in num_lists:\n diff = abs(i - j)\n if diff > ans:\n ans = diff\nprint(ans)']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s281442931', 's403070741', 's742690708', 's182514579']
|
[3060.0, 3060.0, 2940.0, 3060.0]
|
[17.0, 17.0, 17.0, 19.0]
|
[179, 181, 143, 181]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.