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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02725 | u797550216 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\n\na = list(map(int,input().split()))\nk_diff = []\n\nfor i in range(1,n):\n k_diff.append(abs(a[i-1] - a[i]))\n\nk_diff.append(k - a[-1])\n\nprint(k - max(k_diff))', 'k,n = map(int,input().split())\n\na = list(map(int,input().split()))\nk_diff = []\n\nfor i in range(1,n):\n k_dif... | ['Wrong Answer', 'Accepted'] | ['s445289868', 's881706522'] | [26444.0, 26444.0] | [126.0, 116.0] | [188, 189] |
p02725 | u798675549 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K=int(input().split()[0])\nlst=list(map(int,input().split()))\nlst.append(K-sum(lst))\nprint(K-min(lst))', 'K=int(input().split()[0])\nlst1=list(map(int,input().split()))\nlst2=[lst1[i+1]-lst1[i] for i in range(len(lst1)-1)]\nlst2.append(K+lst1[0]-lst1[-1])\nprint(K-max(lst2))'] | ['Wrong Answer', 'Accepted'] | ['s785235111', 's585275894'] | [26060.0, 26444.0] | [71.0, 102.0] | [101, 165] |
p02725 | u806779442 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int,input().split())\na = list(map(int,input().split()))\n\nend = a[0] + k - a[n-1]\nb = []\nb.append(end)\n\nfor i in range(0,n-1):\n diff = a[i+1] - a[i]\n b.append(diff)\n\nb.sort(reverse=True)\nprint(k-max)', 'k, n = map(int,input().split())\na = list(map(int,input().split()))\n\nans = a[0] + k -... | ['Runtime Error', 'Accepted'] | ['s204677701', 's254492075'] | [26060.0, 26444.0] | [147.0, 157.0] | [215, 178] |
p02725 | u810778810 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['info = list(map(int,input().split()))\nk=info[0]\nn=info[1]\na = list(map(int,input().split()))\nMAX=0\n\nfor i in range(n-1):\n if a[i+1]-a[i] > MAX:\n MAX=a[i+1]-a[i]\nif abs(k-a[n-1]) > MAX:\n MAX=abs(k-a[n-1])\nprint(str(k-MAX))', 'info = list(map(int,input().split()))\nk=info[0]\nn=info[1]\na = ... | ['Wrong Answer', 'Accepted'] | ['s657593383', 's880960499'] | [26444.0, 26444.0] | [104.0, 106.0] | [238, 238] |
p02725 | u813993459 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\n \ntmp =list(map(int, input().split()))\nnum=list(map(int, input().split()))\n \na[a>int(tmp[0]//2)]=a[a>int(tmp[0]//2)]-int(tmp[0]//2)\nprint(sum(a))', 'import numpy as np\n\ntmp =list(map(int, input().split()))\nnum=np.array(list(map(int, input().split())))\n\nr = np.diff(num).sum()\n\nl=np.arra... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s054555794', 's130990233', 's557400188', 's693500649', 's737702369', 's792435284', 's813924704', 's047955463'] | [42708.0, 42844.0, 42848.0, 42924.0, 34172.0, 42800.0, 42572.0, 34132.0] | [1728.0, 977.0, 668.0, 416.0, 278.0, 1305.0, 334.0, 236.0] | [164, 321, 142, 162, 163, 172, 171, 167] |
p02725 | u814885356 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = input().split()\nA = [int(val) for val in A]\nA_org = min(A)\nA = [val - A_org for val in A]\nA.sort()\ndist = []\nfor i in range(len(A)):\n if i != len(A)-1:\n dist.append(A[i+1]-A[i])\n else:\n dist.append(K-A[i])\nprint(max(dist)-min(dist))', 'K, N = map(int, input().s... | ['Wrong Answer', 'Accepted'] | ['s682544510', 's938897741'] | [26444.0, 24948.0] | [176.0, 170.0] | [277, 271] |
p02725 | u819593641 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\n\nk, n = map(int, input().split())\na = list(map(int, input().split()))\na.append(k)\nb = []\nfor k in range(len(a)):\n b.append(a[k+1] - a[k])\nprint(k - argmax(b))', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\nb = []\nfor l in range(len(a)-1):\n b.append(a[l+1] - a[... | ['Runtime Error', 'Accepted'] | ['s797641731', 's603909818'] | [42676.0, 26420.0] | [397.0, 115.0] | [178, 169] |
p02725 | u823398800 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['#C traveling salesman around lake\n\nk,n = map(int, input().split())\na = list(map(int, input().split()))\n\nprint(a)\nans = 0\nfor i in range(n-1):\n if a[i+1] - a[i] > ans:\n ans = a[i+1] - a[i]\n\nlast = a[0] + k - a[n-1]\nif last > ans:\n ans = last\n\nprint(k-ans)', '#C traveling salesman around lak... | ['Wrong Answer', 'Accepted'] | ['s613899026', 's571610889'] | [26444.0, 26444.0] | [124.0, 102.0] | [267, 258] |
p02725 | u826027240 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['\nN, X, Y = map(int, input().split())\n\n\nmin = []\nans = []\n\n\nfor i in range(0, N -1):\n d = A[i+1] - A[i]\n ans += d\n if d > max:\n max = d\n\n\ndl = K - A[N - 1]\nif dl < max:\n ans = ans - max + dl + A[0]\n\n\nfor j in range(0, N -1):\n print(ans[j])\n', '\nK, N = map(int, input().split... | ['Runtime Error', 'Accepted'] | ['s933768476', 's236658015'] | [3060.0, 26420.0] | [18.0, 130.0] | [398, 450] |
p02725 | u827306875 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nx1 = list(map(int,input().split()))\nx2 = np.array(x1, dtype=np.int64)\n\nx2 = np.sort(x2)\nsum = 0\n\nfor i in range(N-1):\n sum += x2[1] - x2[0]\n \nprint(sum)', 'import numpy as np\nK, N = map(int, input().split())\nx_list = list(map(int, input().split()))\n\nsub_x_list = x_... | ['Runtime Error', 'Accepted'] | ['s341897242', 's923569549'] | [26444.0, 34176.0] | [65.0, 242.0] | [191, 254] |
p02725 | u827554201 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['# coding: utf-8\n# Your code here!\n\ninput1 = [int(x) for x in input().split()]\nlake = input1[0]\nhomes = input1[1]\ninput2 = [int(x) for x in input().split()]\n\nresult = 1000000\nlast = homes - 1\nfor x in range(homes):\n forward = 0\n backward = 0\n start = input2[x]\n\n # forward\n if x == 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s953893253', 's951610945'] | [26444.0, 26444.0] | [515.0, 261.0] | [661, 662] |
p02725 | u828873269 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N=(int(x) for x in input().split())\nA = list(map(int,input().split()))\ncheck = K- A[N-1]\n\nfor i in range(N-1):\n if(A[i+1]-A[i]>check):\n check=(A[i+1]-A[i])\n \n\nnum = K - check\nprint(num)', 'K,N=(int(x) for x in input().split())\nA = list(map(int,input().split()))\nprint(K)\nprint(N)\nprint... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s298308009', 's721021506', 's959546640'] | [26436.0, 26420.0, 26444.0] | [102.0, 119.0, 106.0] | [204, 231, 209] |
p02725 | u830881690 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\na = list(map(int, input().split()))\n\nad = []\nfor i in range(n):\n if i != (n-1):\n ad.append(a[i+1] - a[i])\n if i == (n-1):\n ad.append(k-a[n-1] + a[0])\n\nad_max = max(ad)\nad_max_ind = ad.index(ad_max)\n\nprint(ad_max_ind)\n\nif ad_max_ind == (n-1):\n ans... | ['Wrong Answer', 'Accepted'] | ['s166624262', 's088860168'] | [26444.0, 26444.0] | [147.0, 149.0] | [404, 385] |
p02725 | u831274245 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = [int(i) for i in input().split()]\nA = sorted([int(i) for i in input().split()])\nprint(K - max(y-x for x,y in zip(A,A[1:])))', 'K,N = [int(i) for i in input().split()]\nA = sorted([int(i) for i in input().split()])\nA += [A[0]+K]\nprint(K - max(y-x for x,y in zip(A,A[1:])))'] | ['Wrong Answer', 'Accepted'] | ['s159980121', 's229644589'] | [26444.0, 26092.0] | [96.0, 95.0] | [129, 143] |
p02725 | u831311378 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = [int(i) for i in input().split()]\na = [int(i) for i in input().split()]\ndmax = 0\nfor i in range(1,n):\n if a[i]-a[i-1]>dmax:\n dmax = a[i]-a[i-1]\nprint(k-dmax)', 'k,n = [int(i) for i in input().split()]\na = [int(i) for i in input().split()]\ndmax = 0\nfor i in range(1,n):\n if a[i]-a[i-1]>dmax:\n d... | ['Wrong Answer', 'Accepted'] | ['s478269086', 's925345688'] | [26420.0, 25452.0] | [112.0, 110.0] | [167, 213] |
p02725 | u831752983 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\na=list(map(int,input().split()))\ndist = [k-dist[n-1]+dist[0]]\nfor i in range(n):\n dist.append(a[i+1]-a[i])\n\nprint(k-max(dist))\n', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\ndist = [k-a[n-1]+a[0]]\nfor i in range(n-1):\n dist.append(a[i+1]-a[i])\n\nprint(k-ma... | ['Runtime Error', 'Accepted'] | ['s831425759', 's780563667'] | [26420.0, 26420.0] | [65.0, 117.0] | [157, 153] |
p02725 | u833933988 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\na = [int(x) for x in input().split()]\na_ = [x - a[0] for x in a] + [k]\nd = [y - x for x, y in zip(a, a[1:])]\nprint(k - max(d))', 'k, n = map(int, input().split())\na = [int(x) for x in input().split()]\na_ = [x - a[0] for x in a] + [k]\nd = [y - x for x, y in zip(a_, a_[1:])]\npri... | ['Wrong Answer', 'Accepted'] | ['s419350873', 's695658201'] | [26444.0, 26444.0] | [113.0, 111.0] | [159, 161] |
p02725 | u834983620 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['a,b = map(int,input().split())\nc = [int(i) for i in input().split()]\n\nresult = sum(c) - c[0]\n\n\n\nprint(result)', 'a,b = map(int,input().split())\naaa = [int(i) for i in input().split()]\n\naaa.append(aaa[0] + a)\n\nresult = [c1 - c0 for c0,c1 in zip(aaa,aaa[0:])]\n\nprint(a - max(result))', 'a,b = map(int,input... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s220018734', 's238862104', 's692996658'] | [26600.0, 24908.0, 26420.0] | [78.0, 91.0, 90.0] | [109, 168, 168] |
p02725 | u835322333 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,(input().split()))\nA = list(map(int,(input().split())))\n\nans = []\nfor i in range(N-1):\n ans.append(A[i+1]-A[i])\n\nans.append(K-A[N-1])\nprint(K-max(ans))', 'K,N = map(int,(input().split()))\nA = list(map(int,(input().split())))\n\nans = []\nfor i in range(N-1):\n ans.append(A[i+1]-A[i])\n\na... | ['Wrong Answer', 'Accepted'] | ['s422883307', 's148151452'] | [26060.0, 26436.0] | [117.0, 118.0] | [168, 175] |
p02725 | u836589274 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['#C\n\nk, n = map(int, input().split())\n\na = list(map(int, input().split()))\n\nd = []\n\nd.append(a[0])\nfor i in range(n-1):\n d.append(a[i+1] - a[i])\n\nd.append(k - a[n-1])\n# print(d)\n\n# print(max(d))\n\n# print(sum(d))\n\nprint(k - max(d))', '#C\n\nk, n = map(int, input().split())\n\na = list(map(int, inp... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s042721070', 's384755207', 's829896517'] | [25840.0, 26060.0, 25840.0] | [116.0, 118.0, 119.0] | [254, 191, 201] |
p02725 | u839188633 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nans = sum(A)\n\nans -= max((A[(i + 1) % N] - A[i]) % K for i in range(N))\n\nprint(ans)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nans = K - max((A[(i + 1) % N] - A[i]) % K for i in range(N))\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s300437434', 's946949141'] | [25840.0, 26436.0] | [110.0, 123.0] | [154, 143] |
p02725 | u842388336 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\nli = list(map(int, input().split()))\nli_2 = []\nfor i in range(1,len(li)):\n li_2.append(li[i]-li[i-1])\nprint(k-max(li_2))\n\n', 'k, n = map(int, input().split())\nli = list(map(int, input().split()))\nprint(k-max(li))', 'k, n = map(int, input().split())\nli = list(map(int, input(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s039282455', 's267502725', 's664622127'] | [32352.0, 32376.0, 32276.0] | [107.0, 73.0, 107.0] | [156, 86, 175] |
p02725 | u844697453 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ["k=list(map(int, input().split(' ')))\na=list(map(int, input().split(' ')))\nm=a[0]\nfor i in range(k[1]):\n if i==k[1]-1:\n if k[0]-a[i]+a[0]>m:\n m=k[1]-a[i]+a[0]>m\n else:\n if a[i+1]-a[i]>m:\n m=a[i+1]-a[i]>m\nprint(k[0]-m)", "k=list(map(int, input().split(' ')))\na=list(m... | ['Wrong Answer', 'Accepted'] | ['s911449115', 's647133076'] | [26420.0, 25840.0] | [160.0, 119.0] | [258, 254] |
p02725 | u844895214 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ["import sys\nfrom collections import deque\nimport numpy as np\nimport math\nsys.setrecursionlimit(10**6)\ndef S(): return sys.stdin.readline().rstrip()\ndef SL(): return map(str,sys.stdin.readline().rstrip().split())\ndef I(): return int(sys.stdin.readline().rstrip())\ndef IL(): return map(int,sys.stdin.readline().rs... | ['Wrong Answer', 'Accepted'] | ['s342955098', 's915692506'] | [50792.0, 32376.0] | [200.0, 118.0] | [625, 332] |
p02725 | u845148770 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int, input().split())\nA = list(map(int,input().split()))\n\n\nl_s = []\ncheck = 0\nfor i in range(0,N):\n if(A[i] == 0):\n check =1\nif(check == 1):\n for i in range(1,N):\n l_s.append(A[i]-A[i-1])\n l_s.append(K-A[N-1])\n num = 0\n ans = 99999999999999999\n for i in range... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s200802382', 's230397779', 's629442800', 's830482369', 's382797873'] | [26444.0, 26444.0, 26444.0, 26444.0, 26444.0] | [193.0, 202.0, 194.0, 196.0, 201.0] | [540, 533, 509, 506, 523] |
p02725 | u845847173 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = [int(e) for e in input().split()]\n\nans = 0\nfor i in range(N - 1):\n S = [A[i] - A[i + 1]]\n S.append(A[N] - A[0])\n S.sort\n for n in range(N - 1):\n ans += S[i]\nprint(ans)', 'K, N = map(int, input().split())\nA = [int(e) for e in input().split()]\n\nans = ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s272586745', 's525766534', 's876999521'] | [24884.0, 26420.0, 24908.0] | [71.0, 73.0, 153.0] | [223, 241, 229] |
p02725 | u847165882 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N=map(int,input().split())\nA=[int(s) for s in input().split(" ")]\n\nSmax=0\nfor i in range(K):\n S=0\n if i==0:\n S=max(abs(A[0]-A[-1]),abs(A[0]-A[1]))\n elif i==K-1:\n S=max(abs(A[-1]-A[0]),abs(A[-1]-A[-2]))\n else:\n S=max(abs(A[i]-A[i+1]),abs(A[i]-A[i-1]))\n if Smax<S:\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s276311333', 's575421481', 's672139861'] | [26444.0, 26420.0, 26572.0] | [241.0, 157.0, 212.0] | [330, 232, 383] |
p02725 | u848336553 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\na = list(map(int, input().split()))\na.sort()\nmax_diff = 0\nfor idx in range(len(a)-1):\n diff = a[idx+1] - a[idx]\n if max_diff < diff:\n max_diff = diff\n\nans = k - max_diff\nprint(ans)\n', 'k, n = input().split()\na = list(map(int, input().split()))\na.sorted()\nmax_diff = ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s305723180', 's949886781', 's506801487'] | [26444.0, 26420.0, 26436.0] | [111.0, 65.0, 110.0] | [219, 210, 253] |
p02725 | u850087201 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K = int(input())\nN = int(input())\nlists = [int(x) for x in input().split()]\nlists.sort()\nsor = []\nfor i in range(N-1):\n sor.append(lists[i+1]-lists[i])\nsor.append(K-lists[N-1]+lists[0])\nprint(K-max(sor))', '[K,N]= [int(x) for x in input().split()]\n\nlists = [int(x) for x in input().split()]\nlists.sort()\... | ['Runtime Error', 'Accepted'] | ['s838235925', 's996353851'] | [3060.0, 24636.0] | [17.0, 132.0] | [206, 214] |
p02725 | u850243304 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\nb = A[0]+(K-A[N-1])\n\nfor i in range(1,N):\n a = max(A[i]-A[i-1])\n\nc = max(a,b)\n\nprint(K-c)\n', 'K,N = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\nc = A[0]+(K-A[N-1])\n\nfor i in range(1,N):\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s113455721', 's131127687', 's139317377', 's159225733', 's178015366', 's351670943', 's417240738', 's512084550', 's621296202', 's632189929', 's715208709', 's765886216', 's795466485', 's918028366', 's944511574', 's993420364', 's321622149'] | [31640.0, 31452.0, 31752.0, 31648.0, 32280.0, 31628.0, 31628.0, 32276.0, 31520.0, 31760.0, 31764.0, 31720.0, 31632.0, 31536.0, 32192.0, 32288.0, 31588.0] | [77.0, 72.0, 94.0, 92.0, 71.0, 95.0, 93.0, 91.0, 92.0, 72.0, 95.0, 129.0, 94.0, 93.0, 98.0, 88.0, 96.0] | [173, 160, 160, 161, 152, 170, 165, 151, 159, 169, 166, 162, 165, 165, 151, 149, 182] |
p02725 | u854867898 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['# maintain overall min \n\n# find the absolute distance and before exiting the first maintain overall min\n# also check the distance of last and first house\ndef findDistBetween(i,j):\n return abs(i - j)\n\ndef minDistfindDistBetweenLastAndFirstHouse(i,j):\n dist = findDistBetween(i, j)\n return K - dist \n\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s615359987', 's904909392', 's515136746'] | [35468.0, 29340.0, 27724.0] | [728.0, 2106.0, 203.0] | [2664, 2274, 2672] |
p02725 | u857330600 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input())\nl=list(map(int,input()))\nv=[k-l[-1]+l[0]]\nfor i in range(n-1):\n v.append(l[i+1]-l[i])\nv.sort()\nprint(k-v[-1])', 'k,n=map(int,input.split())\nl=list(map(int,input.split()))\nv=[k-l[-1]+l[0]]\nfor i in range(n-1):\n v.append(l[i+1]-l[i])\nv.sort()\nprint(k-v[-1])', 'k,n=map(int,input().spli... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s944123524', 's944274407', 's726438793'] | [3060.0, 3060.0, 26420.0] | [17.0, 17.0, 139.0] | [131, 143, 147] |
p02725 | u860002137 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\nk, n = map(int, input().split())\na = np.array(list(map(int, input().split())))\nprint(max(abs(a1 - a2)))', 'import numpy as np\nk, n = map(int, input().split())\na = np.array(list(map(int, input().split())))\nprint(max(abs(a1 - a2)))', 'import numpy as np\nk, n = map(int, input().split())\na = np... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s351621058', 's683031714', 's962069618'] | [42708.0, 34172.0, 34148.0] | [368.0, 210.0, 235.0] | [122, 122, 153] |
p02725 | u861071267 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N=map(int,input().split())\nA=sorted(list(map(int,input().split())))\n\nmax_a = max(A)\nmin_a = min(A)\ndiff_min = max_a - min_a\n\nif diff_min <= K/2:\n print(diff_min)\nelse:\n for i in range(1,N-1):\n tmp = K - (A[i+1] - A[i])\n if tmp < diff_min:\n diff_min = tmp\n tmp = K ... | ['Wrong Answer', 'Accepted'] | ['s223862538', 's317261708'] | [26444.0, 26444.0] | [196.0, 191.0] | [393, 482] |
p02725 | u863964720 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int, input().split())\nA = [int(N) for N in input().split()]\n#print(A[0])\nmax1 = 0\nmax2 = 0\nfor i in range(0,N-1):\n max1 = A[i+1]-A[i]\n if max1>max2:\n max2=max1\nif a[0]==0:\n lastlength = 20-A[N-1]\n if lastlength >max2:\n max2=lastlength\nelse:\n lastlength = A[N-1]-A[0... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s361631144', 's794983138', 's881772385', 's907283380', 's726770236'] | [24948.0, 24908.0, 26436.0, 26444.0, 26444.0] | [119.0, 121.0, 118.0, 119.0, 122.0] | [368, 168, 266, 197, 368] |
p02725 | u867826040 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\na=list(map(int,input().split()))\nprint(sum(a)//2)', 'k,n = map(int,input().split())\na=list(map(int,input().split()))\nb=[i for i in a if i<k//2]\nc=[i for i in a if i>=k//2]\nprint(k-max(c)-max(b))', 'k,n = map(int,input().split())\na=list(map(int,input().split()))\nans=(a[0]-a[-1])+... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s222216991', 's457203989', 's236189159'] | [26444.0, 26060.0, 26420.0] | [72.0, 107.0, 152.0] | [80, 141, 143] |
p02725 | u869265610 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\na,b=list(map(int,input().split()))\nC=list(map(int,input().split()))\n\ndef getnear(list,num):\n near=np.abs(np.asarray(list)-num).argmin()\n return list[near]\n\nS=sorted(C)\nH=getnear(C,a/2)\nr=abs(H+abs(a-S[0]))\nl=abs(H+abs(a-S[-1]))\nif r>l:\n print(l)\nelse:\n print(r)', 'a,b=map(int,inp... | ['Wrong Answer', 'Accepted'] | ['s059747879', 's100130272'] | [50580.0, 32276.0] | [178.0, 132.0] | [284, 152] |
p02725 | u869917163 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,input().split())\nA_list = list(map(int,input().split())\nA_list.append(K+A_list[0])\nA_split = []\ni for in range(N):\n split = A_list[i+1] - A_list[i]\n A_split.append(split)\n\nA_split.pop(A_split.index(max(A_split)))\nprint(sum(A_split))', 'K,N = map(int,input().split())\nA_list = list(map(int... | ['Runtime Error', 'Accepted'] | ['s816517224', 's200036709'] | [2940.0, 26444.0] | [17.0, 120.0] | [252, 235] |
p02725 | u870575557 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nfor i, num in enumerate(a):\n if num>(k/2):\n a[i] = num - k\n\nprint(max(a) - min(a))\n\n', 'k,n = list(map(int, input().split()))\na = list(map(int, input().split()))\n"""\nans = max(a) - min(a)\nfor i, num in enumerate(a):\n ... | ['Wrong Answer', 'Accepted'] | ['s091448425', 's139933059'] | [26420.0, 25840.0] | [126.0, 222.0] | [169, 420] |
p02725 | u871303155 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\npoints = list(map(int, input().split()))\nmax_index = -1\nmax_value = -1\n\nfor index in range(1, N):\n d = points[index] - points[index-1] \n if d > max_value:\n max_index = index\n max_value = d\n\nstart = K - points[max_index]\nend = points[max_index-1]\n\nprint(start + ... | ['Wrong Answer', 'Accepted'] | ['s216674528', 's412347730'] | [25840.0, 26444.0] | [113.0, 112.0] | [308, 389] |
p02725 | u872158847 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = input().split()\nK = int(K)\nN = int(N)\nA = list(map(int, input().split()))\n\nmax = 0\nfor i in range(1, N):\n if max < (A[i] - A[i-1]):\n max = A[i] - A[i-1]\nif (max < A[N-1] - A[0]) and ( A[N-1] - A[0]) < K/2:\n max = A[N-1] - A[0]\nprint(K - max)\n', 'K, N = input().split()\nK = int(K)\nN = ... | ['Wrong Answer', 'Accepted'] | ['s670417888', 's180193055'] | [26444.0, 26444.0] | [105.0, 107.0] | [262, 200] |
p02725 | u874000404 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['\n\ndef quick_sort(arr):\n left = []\n right = []\n if len(arr) <= 1:\n return arr\n\n \n # ref = random.choice(arr)\n ref = arr[0]\n ref_count = 0\n\n for ele in arr:\n if ele < ref:\n left.append(ele)\n elif ele > ref:\n right.append(ele)\n e... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s690151786', 's884766559', 's751284194'] | [26444.0, 26444.0, 26444.0] | [63.0, 64.0, 143.0] | [952, 951, 953] |
p02725 | u875449556 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int, input().split())\nA = list(map(int, input().split()))\n\nx = max(A)\nprint(sum(A) - x)', 'k,n = map(int, input().split())\nA = list(map(int, input().split()))\n\nx = k - A[n-1]\nz = A[0]\nx = max(x,z)\nfor i in range(1,n):\n y = A[i]-A[i-1]\n if y > x:\n x = y\n\nprint(k-x)', 'k,n = map(in... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s271607403', 's338636893', 's495893614', 's256126438'] | [26420.0, 26436.0, 26444.0, 26060.0] | [70.0, 111.0, 115.0, 110.0] | [97, 186, 163, 172] |
p02725 | u878212264 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['arrayNM = list(map(int, input().split()))\narray = list(map(int, input().split()))\nroute = [array[0] + arrayNM[0] - array[arrayNM[1] - 1]]\nfor i in range(1,arrayNM[1]):\n route.append(array[i] - array[i-1])\n \nMax = max(route)\nmaxIndex = route.index(Max)\ndistance = 0\n\nfor i in range(0,maxIndex):\n distance ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s108993823', 's751720866', 's820178101', 's633770753'] | [26444.0, 26444.0, 26444.0, 26444.0] | [156.0, 143.0, 155.0, 151.0] | [414, 401, 410, 403] |
p02725 | u884323674 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = [int(i) for i in input().split()]\n\nmax_dist = A_dist[0] = A[0] + (K - A[-1])\nfor i in range(1, N):\n if A[i] - A[i-1] > min_dist:\n max_dist = A[i] - A[i-1]\n\nprint(K - max_dist)', 'K, N = map(int, input().split())\nA = [int(i) for i in input().split()]\n\nmax_dist ... | ['Runtime Error', 'Accepted'] | ['s578194141', 's827093131'] | [26444.0, 26444.0] | [74.0, 108.0] | [222, 210] |
p02725 | u884601206 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\nA=list(map(int,input().split()))\nd=[0]*len(A)\nfor i in range(len(A)):\n if i==0:\n d[i]=A[len(A)]-A[i]\n else:\n d[i]=k-A[i] + A[i-1]\n \nprint(min(A))\n', 'k,n=map(int,input().split())\nA=list(map(int,input().split()))\nd=[0]*n\nd[0]=A[n-1]-A[0]\nfor i in range(1,n):\n d[i... | ['Runtime Error', 'Accepted'] | ['s930954900', 's871700380'] | [26444.0, 26436.0] | [68.0, 129.0] | [186, 150] |
p02725 | u884679979 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\nlist=list(input().split())\ndif_list=[]\n\nfor i in range(n):\n if i == 0:\n dif_list.append(k-list[-1]+list[0])\n else:\n dif_list.append(list[i]-list[i-1])\n\nprint(k-max(dif_list))', 'k,n=map(int,input().split())\nlist=list(map(int,input().split()))\ndif_list=[]\n\nfor i in ra... | ['Runtime Error', 'Accepted'] | ['s561321068', 's163769220'] | [20044.0, 26444.0] | [36.0, 126.0] | [211, 220] |
p02725 | u890785941 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['f=list(map(int,input().split()))\nk=f[0];n=f[1]\ndists=list(map(int,input().split()))\nprev=0\nmaxdist=0\nfor d in range(len(dists)):\n maxdist=max(maxdist,abs(prev-dists[d]))\n prev=dists[d]\na=max(maxdist,maxdist-dists[len(dists)-1]+dists[0]) \nans=k-a\nprint(ans)\n', 'f=list(map(int,input().split()))\nk=f[0];n=... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s006492610', 's316875951', 's774054094', 's995583979'] | [26444.0, 26060.0, 26000.0, 26420.0] | [152.0, 158.0, 155.0, 177.0] | [260, 259, 263, 229] |
p02725 | u891504219 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['def main():\n K,N = map(int,input().split())\n A = list(map(int,input().split()))\n Aa = []\n for i in range(1,N):\n Aa.append(A[i]-A[i-1])\n Aa.append(K-A[N-1]+A[0])\n print(Aa)\n print(sum(Aa)-max(Aa))\n\nif __name__ == "__main__":\n main()', 'def main():\n K,N = map(int,input().sp... | ['Wrong Answer', 'Accepted'] | ['s169709591', 's716056291'] | [26436.0, 26100.0] | [108.0, 104.0] | [262, 248] |
p02725 | u891516200 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = [int(x) for x in input().split()]\nA = list([int(x) for x in input().split()])\n\nresult = []\n\nfor i in range(N):\n if i == N - 1:\n result.append(K - A[i] + A[0])\n else:\n result.appnd(A[i + 1] - A[i])\n\nresult.sort()\n\nprint(sum(result[:-1]))\n', 'K, N = [int(x) for x in input().spli... | ['Runtime Error', 'Accepted'] | ['s465874099', 's470982485'] | [31512.0, 31640.0] | [75.0, 136.0] | [264, 265] |
p02725 | u892796322 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import copy\n\nK,N = map(int, input().split())\nAn = list(map(int, input().split()))\nans = [max(An) - min(An)]\nfor i in range(len(An)/2,len(An)):\n A_list = copy.copy(An)\n A_list[i] = A_list[i]-K\n ans.append(max(A_list) - min(A_list))\nprint(min(ans))', 'import numpy as np\n\nK,N = map(int, input().split... | ['Runtime Error', 'Accepted'] | ['s838689583', 's698142491'] | [26932.0, 34164.0] | [179.0, 406.0] | [255, 219] |
p02725 | u892882715 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import sys\nread = sys.stdin.buffer.read\n\nK, N, *A = map(int, read.split())\n\nmax_distance = K + (A[0] - A[-1])\n \nfor i in range(1, N):\n max_distance = max(max_distance, A[i] - A[i - 1])\n \nprint(K - max_distance)', 'K, N = map(int, input().split())\nA = list(map(int, intput().split()))\n\nmax_distance = K +... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s198405353', 's205420685', 's276708940'] | [3060.0, 3060.0, 20448.0] | [17.0, 17.0, 132.0] | [212, 206, 216] |
p02725 | u894934980 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = list(map(int, input().split()))\nans = 0\nfor a in A:\n if a > K // 2:\n ans += a - K // 2\n else:\n ans += a\n\nprint(ans)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\nA.append(A[0] + K)\nmax_diff = -1\nfor i in range(1, N + 1):... | ['Wrong Answer', 'Accepted'] | ['s265304902', 's304736061'] | [25836.0, 26444.0] | [119.0, 135.0] | [173, 193] |
p02725 | u895592784 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\nk, n = map(int, input().split())\na = np.array(list(map(int, input().split())))\nmini = -1\nfor i in a:\n tmp = a - i\n tmp = np.abs(tmp)\n if mini == -1:\n mini = max(tmp) - min(tmp)\n else:\n mini = min(mini, max(tmp) - min(tmp))\nprint(mini)', '\nimport numpy as np\nk,... | ['Wrong Answer', 'Accepted'] | ['s684483786', 's176832169'] | [34112.0, 34184.0] | [2113.0, 871.0] | [279, 492] |
p02725 | u899457989 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K , N = map(int, input().split())\nA = sorted(list(map(int, input().split())))\nB = []\n\nmax = K - A[-1] + A[0]\nB.append(max)\nind = 0\nfor i in range(1, N, 1):\n\t_max = A[i] - A[i-1]\n\tB.append(_max)\n\tif _max < 0:\n\t\t_max = K + _max\n\tif _max > max:\n\t\tmax = _max\n\t\tind = i\ndis1 = 0\nfor i in range(1, ... | ['Wrong Answer', 'Accepted'] | ['s319072645', 's443076467'] | [26444.0, 26444.0] | [370.0, 205.0] | [386, 389] |
p02725 | u899929023 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = list(map(int,input().split(" ")))\nA = list(map(int,input().split(" ")))\nmax_dist = 0\nfor i in range(len(A)-1):\n if A[i+1]-A[i] > max_dist:\n max_dist = A[i+1]-A[i] \nprint(k-max_dist)\n ', 'k,n = list(map(int,input().split(" ")))\nA = list(map(int,input().split(" ")))\nmax_dist = 0\nfor i in range(len(... | ['Wrong Answer', 'Accepted'] | ['s301119193', 's875334864'] | [26444.0, 26420.0] | [103.0, 100.0] | [194, 249] |
p02725 | u902151549 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['# coding: utf-8\nimport re\nimport math\nfrom collections import defaultdict\nimport itertools\nfrom copy import deepcopy\nimport random\nfrom heapq import heappop,heappush\nimport time\nimport os\nimport queue\nimport sys\nimport datetime\nfrom functools import lru_cache\n#@lru_cache(maxsize=None)\nreadline=sys.stdi... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s239558020', 's879554717', 's200423719'] | [26700.0, 26700.0, 26700.0] | [135.0, 136.0, 162.0] | [3589, 3602, 3619] |
p02725 | u903005414 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ["import numpy as np\nK, N = map(int, input().split())\nA = np.array(list(map(int, input().split())))\ndiff = A[1:] - A[:-1]\ndiff = np.append(diff, K + A[0] - A[-1])\nprint('diff', diff)\nans = diff.sum() - diff.max()\nprint(ans)\n", "import numpy as np\nK, N = map(int, input().split())\nA = np.array(list(map(int, inp... | ['Wrong Answer', 'Accepted'] | ['s501926422', 's148918506'] | [34160.0, 35824.0] | [215.0, 214.0] | [222, 224] |
p02725 | u904331908 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\n\nAi = list(map(int,input().split()))\nkyori = []\n\nfor x in range(n-1):\n kyori.append(Ai[x+1]-Ai[x])\n \nkyori.append(Ai[0]+k-Ai[n-1])\n\nkyoto.remove(max(kyori))\n\nprint(sum(kyori))\n', 'k,n = map(int,input().split())\n\nAi = list(map(int,input().split()))\nkyori = []\n\nfor x i... | ['Runtime Error', 'Accepted'] | ['s410892156', 's020919525'] | [32336.0, 32352.0] | [102.0, 112.0] | [209, 209] |
p02725 | u904547029 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = list(map(int,input().split()))\nA = list(map(int,input().split()))\n\ndistence_list = [x for x in [ A[i+1] - A[i] for i in range(len(A)-1)]]\n\nm = max(distence_list)\n\nprint(K-m)\n', 'K,N = list(map(int,input().split()))\nA = list(map(int,input().split()))\n\ndistence_list = [x for x in [ A[i+1] - A[i] for i ... | ['Wrong Answer', 'Accepted'] | ['s701878813', 's177133339'] | [26420.0, 25920.0] | [107.0, 104.0] | [180, 242] |
p02725 | u906501980 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['def main():\n x, y = map(int, input().split())\n a = list(map(int, input().split()))\n cost = 10*10\n for i in range(n-1):\n cost = min(cost, k - abs(a[i]-a[i+1]))\n print(min(cost, k-abs(a[0]+k-a[n-1])))\n\nif __name__ == "__main__":\n main()', 'def main():\n k, n = map(int, input().split... | ['Runtime Error', 'Accepted'] | ['s646101182', 's697790547'] | [26444.0, 25836.0] | [65.0, 142.0] | [259, 233] |
p02725 | u907414670 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = input().split()\na_list_org = list(map(int,input().split()))\na_list_org.sort()\na_list = [a - int(k) if (a > int(k) // 2) else a for a in a_list_org]\na_list.sort()\nprint(a_list)\nans1 = 0\nans2 = 0\nfor a in a_list:\n if a == a_list[0]:\n pre = a\n continue\n else:\n ans1 += (a - ... | ['Wrong Answer', 'Accepted'] | ['s799908574', 's602437491'] | [26444.0, 26444.0] | [273.0, 124.0] | [491, 296] |
p02725 | u907446975 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['(n,m)=map(int,input().split())\na=input().split()\na=list(map(int,a))\nl=[]\nk=0\na=sorted(a)\nfor i in range(m-1):\n d=abs(a[i]-a[i+1])\n k=k+d\n l.append(d)\n# k=k-d\nc=n-k\nprint(c)\nl=sorted(l)\nl1=sum(l)\nprint(l1-l[-1])', '(n,m)=map(int,input().split())\na=input().split()\na=list(map(int,a))\nl=[]\nk=0... | ['Wrong Answer', 'Accepted'] | ['s566701127', 's523651097'] | [25840.0, 26444.0] | [189.0, 183.0] | [219, 222] |
p02725 | u910632349 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\na=list(map(int,input().split()))\nb=[]\nfor i in range(n-1):\n b.append(a[i+1]-a[i])\nb.append((k-a[n-1])+a[0])\nprint(b)\nprint(k-max(b))', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\nb=[]\nfor i in range(n-1):\n b.append(a[i+1]-a[i])\nb.append((k-a[n-1])+a[0]... | ['Wrong Answer', 'Accepted'] | ['s522495465', 's226176172'] | [32328.0, 32304.0] | [121.0, 111.0] | [164, 155] |
p02725 | u914330401 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['#include <bits/stdc++.h>\nusing namespace std;\n\nint main()\n{\n int64_t n, k;\n cin >> k >> n;\n vector<int64_t> li(n * 2);\n for (int i = 0; i < n; ++i)\n {\n cin >> li[i];\n li[i + n] = li[i] - k;\n }\n sort(li.begin(), li.end());\n int64_t ans = 10e9;\n for (int i = 0; i < 2 * n - (n - 1); ++i)\n ... | ['Runtime Error', 'Accepted'] | ['s977330591', 's746395789'] | [2940.0, 26436.0] | [19.0, 216.0] | [373, 250] |
p02725 | u919017918 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\n\nhouse_list = list(map(int, input().split()))\nprint(house_list)\n\n\nif 0 in house_list:\n print(min(house_list[-1] - house_list[1], house_list[-1] - house_list[0]))\nelse:\n print(min(house_list[-1] - house_list[1]))', 'K, N = map(int, input().split())\n\nhouse_list = list(m... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s489019481', 's559243100', 's880724074', 's093891764'] | [26444.0, 26444.0, 25804.0, 25840.0] | [90.0, 72.0, 67.0, 116.0] | [250, 251, 251, 268] |
p02725 | u920604133 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int, input().split())\n\na = [ int (x) for x in input().split() ]\n\nkyori_sa = []\n\nprint(len(a)-1)\n\n\nfor i in range(n):\n if i == len(a)-1:\n kyori_sa.append(a[0] - ( k - a[i] ))\n else:\n kyori_sa.append(a[i+1] - a[i])\n\nprint(k-max(kyori_sa))', 'k,n = map(int, input().split())\n\na = [ int ... | ['Wrong Answer', 'Accepted'] | ['s720155903', 's424687511'] | [26444.0, 25452.0] | [147.0, 148.0] | [254, 242] |
p02725 | u922769680 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N=map(int,input().split())\na_list=list(map(int,input().split()))\nb_list=[]\nfor i in range(N-1):\n X=a_list[i+1]-a_list[i]\n b_list.append(abs(X))\nb_list.append(K-a_list[-1]+a_list[0])\nprint(b_list)\nprint(K-max(b_list))', 'K,N=map(int,input().split())\na_list=list(map(int,input().split()))\nb_list=[]\nfo... | ['Wrong Answer', 'Accepted'] | ['s151537658', 's362717831'] | [25840.0, 25452.0] | [144.0, 131.0] | [224, 210] |
p02725 | u924717835 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int,input().split())\na = list(map(int,input().split()))\nx = [a[0]-a[-1]+K]\nfor i in range(1,N):\n x.append(a[i]-a[i-1])\nprint(x)\nprint(K-max(x))', 'K, N = map(int,input().split())\na = list(map(int,input().split()))\nx = [a[0]-a[-1]+K]\nfor i in range(1,N):\n x.append(a[i]-a[i-1])\nprint(K-max(x... | ['Wrong Answer', 'Accepted'] | ['s999096626', 's385490247'] | [26444.0, 26444.0] | [131.0, 121.0] | [157, 148] |
p02725 | u927839462 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['kn=list(map(int, input().split()))\na=list(map(int, input().split()))\nk=kn[0]\nn=kn[1]\nmaxdis=a[n-1]+a[0]\nfor i in range(n-1):\n if maxdis<(a[i+1]-a[i]):\n maxdis=(a[i+1]-a[i])\nprint(k-maxdis)', 'kn=list(map(int, input().split()))\na=list(map(int, input().split()))\nk=kn[0]\nn=kn[1]\nmaxdis=k-a[n-1]+a[0... | ['Wrong Answer', 'Accepted'] | ['s366690099', 's846491724'] | [26444.0, 26444.0] | [102.0, 106.0] | [198, 256] |
p02725 | u931173291 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['e = list(map(int,input().split()))\nK = e[0]\nN = e[1]\na = list(map(int,input().split()))\nc = [a[i+1] - a[i] for i in range(N-1)]\nf = a[0]+20 - a[N-1]\nc.append(f)\nd = max(c)\nprint(c)\nprint(d)\nprint(K - d)\n', 'K,N = map(int,input().split())\na = list(map(int,input().split()))\nc = a[1:]-a[:-1]\nd = max(c)\npr... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s084287712', 's251828440', 's262011178'] | [25840.0, 26444.0, 26444.0] | [113.0, 70.0, 107.0] | [203, 107, 185] |
p02725 | u932868243 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\nlista=list(map(int,input().split())) \nlista.append(lista[0]+k)\nans=[]\nfor i in range(1,n):\n ans.append(lista[i]-lista[i-1])\nprint(k-max(ans))', 'k,n=map(int,input().split())\nlista=list(map(int,input().split())) \nans=[]\nfor i in range(n-1):\n ans.append(lista[i+1]-lista[i])\npri... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327851910', 's417658731', 's724993008', 's792369295', 's127688924'] | [26444.0, 26444.0, 26444.0, 26420.0, 26420.0] | [124.0, 116.0, 75.0, 119.0, 118.0] | [171, 146, 102, 146, 146] |
p02725 | u934053315 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['m, n = map(int, input().split())\nnums = list(map(int, input().split()))\n\na = 0\nfor i in range(n):\n if i == n-1:\n dif = m - nums[i]\n else:\n dif = nums[i+1] - nums[i]\n a = max(a, dif)\n \nprint(m-a)\n\n', 'm, n = map(int, input().split())\nnums = list(map(int, input().split()))\n \na = 0\nfor i in ra... | ['Wrong Answer', 'Accepted'] | ['s731984286', 's956594634'] | [25836.0, 26436.0] | [164.0, 175.0] | [206, 213] |
p02725 | u934868410 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\na = list(map(int,input().split()))\nans = a[n-1] + a[0]\nfor i in range(n-1):\n ans = min(ans, k - a[i+1] + a[i])\nprint(ans)', 'k,n = map(int,input().split())\na = list(map(int,input().split()))\nans = k - a[n-1] + a[0]\nfor i in range(n-1):\n ans = min(ans, a[i+1] - a[i])\nprint(an... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s362200019', 's683468675', 's796591838'] | [26436.0, 26436.0, 26420.0] | [153.0, 147.0, 146.0] | [153, 153, 153] |
p02725 | u935558307 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,input().split())\nA = list(map(int,input().split()))\n\nfoK,N = map(int,input().split())\nA = list(map(int,input().split()))\nans = []\n\nfor i in range(N-1):\n now = i\n pre = now-1\n post = now +1\n \n if now == 0:\n preDic = (K-A[N-1])+A[now]\n else:\n preDic = A[now]-A[pre]\n postDic = ... | ['Runtime Error', 'Accepted'] | ['s426024940', 's162794281'] | [26444.0, 26444.0] | [69.0, 214.0] | [497, 425] |
p02725 | u936378263 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\ndist = [0] * (N-1)\n\nfor i in range(N-1):\n dist[i] = A[i+1] - A[i]\n \nprint(K - max(dist))', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\ninv_ans = 0\n\nfor i in range(N-1):\n if inv_ans < A[i+1] - A[i]:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s137781420', 's283298922', 's768075495'] | [25840.0, 25840.0, 26444.0] | [112.0, 104.0, 111.0] | [162, 181, 185] |
p02725 | u936735179 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = list(map(int,input().split()))\na = list(map(int,input().split()))\nmax_d = 0\nfor idx, i in enumerate(a):\n if idx == n - 1:\n if max_d < n - a[-1] + a[0]:\n max_d = n - a[-1] + a[0]\n else:\n if max_d < a[idx + 1] - i:\n max_d = a[idx + 1] - i\nprint(k - max_d)', 'k,... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s055977152', 's643523610', 's109977834'] | [26444.0, 26444.0, 26444.0] | [121.0, 124.0, 105.0] | [302, 227, 213] |
p02725 | u938256038 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\n\nK, N = map(int, input().split())\nA = [int(x) for x in input().split()]\nA.append(K)\n\ndiff_A = []\nfor i in range(N):\n diff_A.append(A[i+1] - A[i])\ndiff_max = max(diff_A)\nprint(K - diff_max)', 'import numpy as np\n\nK, N = map(int, input().split())\nA = [int(x) for x in input().split()]\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s572146966', 's970802446', 's281901091'] | [35096.0, 35096.0, 35136.0] | [255.0, 254.0, 254.0] | [210, 200, 215] |
p02725 | u941022948 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\na=[0]*n\na=list(map(int, input().split()))\nfor i in range(n):\n if a[i]>(k+0.5)//2:\n a[i]=int((k+0.5)//2)-a[i]\nla=sorted(a)\nprint(max(a)-la[0])', 'k, n = map(int, input().split())\na=[0]*n\na=list(map(int, input().split()))\nfor i in range(n):\n if a[i]>k/2:\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s066513360', 's301346714', 's534220969', 's614163109', 's644125021'] | [27116.0, 27980.0, 25928.0, 27956.0, 26100.0] | [236.0, 147.0, 76.0, 75.0, 148.0] | [184, 170, 128, 215, 248] |
p02725 | u942144900 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import sys\nread = sys.stdin.buffer.read\n \nK, N, *A = map(int, read().split())\nA.append([A[0] + K])\ngap = max(y - x for x, y in zip(A, A[1:]))\nprint(K - gap)', 'import sys\nread = sys.stdin.buffer.read\n \nK, N, *A = map(int, read().split())\nA.append(A[0] + K)\ngap = max(y - x for x, y in zip(A, A[1:]))\nprint(... | ['Runtime Error', 'Accepted'] | ['s809226869', 's757653818'] | [20348.0, 20348.0] | [80.0, 78.0] | [156, 154] |
p02725 | u944643608 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\nK, N = map(int, input().split())\nA = list(map(int, input().split()))\nA = np.array(A)\nma = 0\nfor i in range(N-1):\n tmp = abs(A[i] -A[i+1])\n if min(tmp,K - tmp) > ma:\n ma = min(tmp,K-tmp)\nprint(K - ma)\n ', 'import numpy as np\nK, N = map(int, input().split())\nA = list(map(int, inpu... | ['Wrong Answer', 'Accepted'] | ['s978419196', 's822780128'] | [43056.0, 42844.0] | [1528.0, 1962.0] | [228, 244] |
p02725 | u945157177 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int, input().split())\nl_1 = [int(x) for x in input().split()]\nl_2 = []\nfor i in range(n-1):\n dis = l_1[i+1]-l_1[i]\n l_2.append(dis)\ndis = k-l_1[n-1]+l_1[0]\nl_2.append(dis)\nprint(l_2)\nans = k-max(l_2)\nprint(ans)', 'k,n = map(int, input().split())\nl_1 = [int(x) for x in input().split()]\nl_2 ... | ['Wrong Answer', 'Accepted'] | ['s838994396', 's981246504'] | [26444.0, 24948.0] | [145.0, 129.0] | [226, 227] |
p02725 | u949115942 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\n\nAn = list(map(int, input().split()))\n\nAnk = [0] + An[:] + [k]\n\nnode = [Ank[i+1] - Ank[i] for i in range(len(Ank) - 1)]\n\nprint(sum(node) - max(node))', 'k, n = map(int, input().split())\n\nAn = list(map(int, input().split()))\n\ndef cal(An):\n if len(An) == 1:\n pri... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s253237420', 's679645149', 's605921833'] | [25840.0, 26420.0, 26444.0] | [103.0, 94.0, 102.0] | [183, 292, 191] |
p02725 | u951425592 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\nA = list(map(int,input().split()))\n#A = list(map(int,input().split()))\n\nhalf = k/2\nans = 0\nfor i in range(n):\n if A[i] >= half:\n ans += A[i] - half\n else:\n ans += A[i]\nprint(ans)\n\n', 'k,n = map(int,input().split())\nA = list(map(int,input().split()))\n#A = list(map(... | ['Wrong Answer', 'Accepted'] | ['s637571577', 's865587267'] | [26436.0, 26444.0] | [141.0, 151.0] | [219, 360] |
p02725 | u954489496 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['from sys import stdin, stdout \n\nn = stdin.readline() \narr = [int(x) for x in stdin.readline().split()] \nK=arr[0]\nN=arr[1]\nn = stdin.readline() \nA = [int(x) for x in stdin.readline().split()] \ndist=[]\nfor i in range(0,N-1):\n dist.append(A[i+1]-A[i])\ndist.append(abs(A[0]-A[-1]+K))\n\nm=max(dist)\nfor idx... | ['Runtime Error', 'Accepted'] | ['s015781804', 's941542174'] | [24908.0, 26444.0] | [76.0, 143.0] | [395, 314] |
p02725 | u957098479 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,input().split())\nA = list(map(int,input().split()\n\nX = A[1] - A[0]\ni = 1\nwhile i < N-1:\n Y = A[i+1] - A[i]\n if X < Y:\n X = Y\n i += 1\nZ = A[0] + K - A[N-1]\nif X < Z:\n X = Z\n\nprint(K - X)', 'K,N = map(int,input().split())\nA = list(map(int,input().split()))\n\nX = A[1] - A... | ['Runtime Error', 'Accepted'] | ['s795959202', 's132989336'] | [2940.0, 26444.0] | [17.0, 142.0] | [218, 220] |
p02725 | u964904181 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nA2 = [K+a for a in A]\n\nA = A + A2\nprint(A)\ndist1 = A[N-1] - A[0]\ndist2 = A[2*N-2] - A[N-1]\n\nprint(min(dist1, dist2))\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nA3 = A + [K+a for a in A]\ndist = [A3[i+N-1... | ['Wrong Answer', 'Accepted'] | ['s746115968', 's146442508'] | [35212.0, 34752.0] | [122.0, 122.0] | [187, 159] |
p02725 | u966542724 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['kn = input().split()\na = input().split()\n\nal = [int(i) for i in a]\nk = int(kn[0])\nn = kn[1]\n\nml = 20 - abs(al[len(al)-1] - al[0])\nprint(ml)\n\nfor i in range(len(al)):\n\tif i == 0:\n\t\tml = max(ml, abs(al[0]-al[1]))\n\t\t# print(abs(al[0])-al[len(al)-1])\n\telif i == len(al)-1:\n\t\t1 == 1\n\t\t\n\telse:\n\... | ['Wrong Answer', 'Accepted'] | ['s132764161', 's572855423'] | [27852.0, 24948.0] | [451.0, 169.0] | [431, 208] |
p02725 | u967835038 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\na=[]\na=list(map(int,input().split()))\ndis=[]\ndis.append(a[0]+(k-a[n-1]))\nfor i in range(n-1):\n dis.append(a[i+1]-a[i])\nprint(min(dis))', 'k,n=map(int,input().split())\na=[]\na=list(map(int,input().split()))\ndis=[]\ndis.append(a[0]+(k-a[n-1]))\nfor i in range(n-1):\n dis.appe... | ['Wrong Answer', 'Accepted'] | ['s198039479', 's673726332'] | [25840.0, 26444.0] | [116.0, 117.0] | [166, 169] |
p02725 | u968404618 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['from itertools import accumulate\nimport sys\ninput=lambda :sys.stdin.readline().rstrip()\n\nk, n = map(int, input().split())\nA = list(map(int, input().split()))\n\nS = [0] + list(accumulate(A))\nd = [S[i] - S[i - k] for i in range(k, n + 1)]\nprint(d)', 'k, n = map(int, input().split())\nA = list(map(int, input().s... | ['Wrong Answer', 'Accepted'] | ['s532407503', 's226838891'] | [25840.0, 32280.0] | [80.0, 128.0] | [244, 162] |
p02725 | u968649733 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = [int(n) for n in input().split()]\nA = [int(n) for n in input().split()]\n\nmin_dis = K+1\n\nfor i in range(len(A) -1):\n dis = A[i+1] - A[i]\n if dis < min_dis:\n ans = (i+1)+1\n min_dis = dis\nprint(ans)', 'K, N = [int(n) for n in input().split()]\nA = [int(n) for n in input().split()]\n\nmax_dis = 0... | ['Wrong Answer', 'Accepted'] | ['s526376465', 's285452470'] | [26420.0, 26444.0] | [118.0, 169.0] | [223, 303] |
p02725 | u968846084 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\nA=list(map(int,input().split()))\nans=A[0]-A[-1]+n\nfor i in range(n-1):\n a=A[i+1]-A[i]\n if a>ans:\n ans=a\nprint(k-a)', 'k,n=map(int,input().split())\nA=list(map(int,input().split()))\nans=A[0]-A[-1]+n\nfor i in range(n-1):\n a=A[i+1]-A[i]\n if a>ans:\n ans=a\nprint(k-ans)',... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s278747028', 's866141318', 's187212469'] | [26444.0, 26420.0, 26436.0] | [108.0, 110.0, 114.0] | [148, 150, 151] |
p02725 | u969211566 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n = map(int,input().split())\na = list(map(int,input().split()))\nb = [0]*n\na.sort()\namin = a[n-1] - a[0]\nfor i in range(n):\n if a[i] < k//2:\n b[i] = a[i] + k\n else:\n b[i] = a[i]\nb.sort()\nbmin = b[n-1] - b[0]\nprint(a,b)\nprint(min(amin,bmin))', 'k,n = map(int,input().split())\na = list(map(int,inp... | ['Wrong Answer', 'Accepted'] | ['s211728631', 's797359797'] | [26444.0, 25452.0] | [165.0, 137.0] | [249, 164] |
p02725 | u970133396 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['import numpy as np\nK, N = map(int, input().strip().split())\nA = list(map(int, input().strip().split()))\n\n# min_=10**6\ndA=np.diff(A)\nnp.append(dA,A[0]+K-A[-1])\nskip_dist=np.max(dA)\nans=K-skip_dist\n\nprint(ans)', 'import numpy as np\nK, N = map(int, input().strip().split())\nA = list(map(int, input().strip().s... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s149200482', 's318265552', 's744910786', 's470299303'] | [34152.0, 42428.0, 35780.0, 34160.0] | [219.0, 1195.0, 239.0, 232.0] | [207, 205, 204, 207] |
p02725 | u975039852 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k, n = map(int, input().split())\na = list(map(int, input().split()))\na.append(k - sum(a))\nprint(k - max(a))', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\nd = [a[i+1] - a[i] for i in range(n-1)]\nd.append(k + a[0] - a[-1])\nprint(k - max(d))\n'] | ['Wrong Answer', 'Accepted'] | ['s549677444', 's458586686'] | [26444.0, 26444.0] | [70.0, 100.0] | [107, 154] |
p02725 | u975820355 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['X = int(input())\n\na = int(X / 500)*1000 + int((X%500)/5)*5\nprint(a)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nmax = A[0] + (K - A[-1])\nfor i in range(len(A)-1):\n d = A[i+1] - A[i]\n if d > max:\n max = d\nprint(K-max)'] | ['Runtime Error', 'Accepted'] | ['s839513339', 's137162548'] | [2940.0, 26444.0] | [17.0, 112.0] | [68, 179] |
p02725 | u981864683 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,input().split())\nA = list(map(int,input().split()))\n\ndiff = []\n\n\nfor i in range(N-1):\n Diff = A[i+1] -A[i]\n diff.append(Diff)\n \ndiff.append(K-A[N-1]-A[0])\n\n\nDIFF = sorted(diff)\nprint(DIFF)\nif A[0] == 0:\n del DIFF[-1]\n\nprint(sum(DIFF))', 'K,N = map(int,input().split())\nA = ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s338199199', 's993015223', 's896631982'] | [25840.0, 26444.0, 26444.0] | [160.0, 163.0, 148.0] | [260, 243, 231] |
p02725 | u985374340 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K, N = list(map(int, input().split()))\nA = [0] * N\nA = list(map(int, input().split()))\n\nsorted_A = sorted(A)\nsorted_A = [i - sorted_A[0] for i in sorted_A]\n\nprint(sorted_A)\n\ndis = []\nfor i in range(len(sorted_A)-1):\n dis.append(abs(sorted_A[i] - sorted_A[i+1]))\n\nlast_dis = abs(sorted_A[-1] - sorted_A[... | ['Wrong Answer', 'Accepted'] | ['s053774746', 's448893552'] | [27980.0, 27980.0] | [163.0, 149.0] | [401, 384] |
p02725 | u987326700 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['round,house_num = map(int,input().split())\n\ndistance = list(map(int,input().split()))\n\nmin = distance[-1] - distance[0]\n\nfor i in range(house_num - 1):\n if round-(distance[i+1]-distance[i]) < min:\n min = round-(distance[i+1]-distance[i])\n print(min)', 'n,k = map(int,input().split())\na = list(map(int,in... | ['Wrong Answer', 'Accepted'] | ['s564549489', 's606141319'] | [26060.0, 26420.0] | [267.0, 119.0] | [254, 172] |
p02725 | u991269553 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ["k,n = map(int,input().split())\na = list(map(int,input().split()))\n\n#print(a)\nsa = []\nfor i in range(1,n):\n sa_ = a[i]-a[i-1]\n sa.append(sa_)\n#print(sa)\nk_last = k\nfor j in range(len(sa)):\n k_last -= sa[j]\n#print('k_last=',k)\n\nans = k_last - max(sa)\nif ans < 0:\n print(max(sa))\nelif ans ... | ['Wrong Answer', 'Accepted'] | ['s470126573', 's121219139'] | [26644.0, 26444.0] | [159.0, 142.0] | [340, 239] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.