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 | u613292673 | 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\nB = [A[i+1] - A[i] for i in range(len(A)-1)]\nB.append(K-A[-1] + A[0])\n\nprint(B)\nprint(K - max(B))', 'K, N = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\nB = [A[i+1] - A[i] for i in range(len(A)-1)]\nB.append(... | ['Wrong Answer', 'Accepted'] | ['s250884785', 's606364061'] | [26444.0, 25452.0] | [117.0, 100.0] | [173, 165] |
p02725 | u613920660 | 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().strip().split()))\nK=KN[0]\nN=KN[1]\nA_list=list(map(int,input().strip().split()))\n\nDis_list=[A_list[n]-A_list[n-1] for n in range(1,N)]\nDis_list.append(K-(A_list[N-1]-A_list[0]))\n\nmin_distance=K-max(Dis_list)\n\nprint(Dis_list)\nprint(min_distance)\n', 'KN=list(map(int,input().strip().sp... | ['Wrong Answer', 'Accepted'] | ['s273236692', 's685296020'] | [26444.0, 26444.0] | [109.0, 96.0] | [268, 252] |
p02725 | u615034089 | 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,k = map(int,input().split())\nl = list(map(int,input().split()))\ndif = []\nfor i in range(k):\n if(i==k-1):\n dif.append(abs(n-l[i]) + l[0])\n else:\n dif.append(abs(l[i]-l[i-1]))\n\nans = sum(dif)-max(dif)\nprint(ans)\n', 'n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl =... | ['Wrong Answer', 'Accepted'] | ['s171835027', 's823087479'] | [26436.0, 25840.0] | [145.0, 147.0] | [232, 247] |
p02725 | u617037231 | 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 = list(map(int,input().split()))\nif K not in L:\n L.reverse()\n K = L[0]\n for i in range(1,len(L)):\n K-=L[i]\n print(K)\nelse:\n K = 0\n for i in range(len(L)-1):\n K += abs(L[i+1]-L[i])\n print(K)\n \n \n', 'K,N = map(int,input().split())\nL = [i for i in map(i... | ['Wrong Answer', 'Accepted'] | ['s705538540', 's663520556'] | [26444.0, 26436.0] | [98.0, 121.0] | [246, 174] |
p02725 | u618107373 | 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 i in range(n-1):\n ans=max(ans,a[i+1]-a[i])\nans=max(ans,k-a[-1])\nprint(k-ans)', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\nans=0\nfor i in range(n-1):\n ans=max(ans,a[i+1]-a[i])\nans=max(ans,a[0]+k-a[-1])\nprint(k-ans... | ['Wrong Answer', 'Accepted'] | ['s313901215', 's949505660'] | [26444.0, 26060.0] | [147.0, 147.0] | [149, 154] |
p02725 | u619809897 | 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()))\n\nx_list = A_list[:-1]\n\ny_list = A_list[1:]\n\ndiff_list = list(map(lambda x,y: y - x, x_list, y_list))\ndiff_list.append(int(K-A_list[-1]))\n\nprint(K - max(diff_list))', 'K,N = map(int, input().split())\nA_list = list(map(int, input().spli... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s479952581', 's513334077', 's827282406', 's556007984'] | [26436.0, 25840.0, 26420.0, 26420.0] | [95.0, 97.0, 96.0, 94.0] | [236, 236, 236, 249] |
p02725 | u620464724 | 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\nsys.setrecursionlimit(4100000)\n\nk,n = map(int,input().split())\na = list(map(int,input().split()))\nb = []\nfor v in range(n-1):\n b.append(a[v+1]-a[v])\n\nb.append(k-a[n-1]+a[0])\nprint(b)\nanss = max(b)\nans = k - anss\nprint(str(ans))', 'import sys\nsys.setrecursionlimit(4100000)\n\nk,n = map(int,... | ['Wrong Answer', 'Accepted'] | ['s461466618', 's624262575'] | [26444.0, 26420.0] | [127.0, 116.0] | [241, 232] |
p02725 | u621225737 | 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())\nA = [int(input()) for i in range(N)]\n\nD = []\nfor i in range(N):\n\tD.append((K + A[i] - A[i - 1]) % K)\n \nprint(K - max(D))', '# K = int(input())\n# N = int(input())\n\nK, N = list(map(int,input().split()))\nA = list(map(int,input().split()))\n \nD = []\nfor i in range(N):\n... | ['Runtime Error', 'Accepted'] | ['s435234914', 's817240650'] | [3060.0, 26420.0] | [17.0, 136.0] | [157, 237] |
p02725 | u621345513 | 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, k = list(map(int, input().split()))\na_list = list(map(int, input().split()))\nprint(n , a_list[-1] , a_list[0])\n\nprint(\n n - \\\n max(\n [a_2 - a_1 \\\n for a_1, a_2 in \\\n zip(\n a_list[:-1], \n a_list[1:]\n )\n ] + \\\n [n - a_list[-1] + a_... | ['Wrong Answer', 'Accepted'] | ['s415481446', 's486888604'] | [25804.0, 25840.0] | [87.0, 85.0] | [316, 282] |
p02725 | u624613992 | 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 \n s = list(map(int,input().split()))\n longest = 0\n for i in range(n-1):\n long = s[i+1] - s[i]\n if long > longest:\n longest = long\n if longest >= k - s[n-1] + s[0]:\n print(k - longest)\n else:\n print(s[n-1] - s[0])'... | ['Runtime Error', 'Accepted'] | ['s712639637', 's097293117'] | [3064.0, 26436.0] | [18.0, 110.0] | [306, 268] |
p02725 | u624696727 | 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\nimport numpy as np\n\nsys.setrecursionlimit(10 ** 6)\nint1 = lambda x: int(x) - 1\nprintV = lambda x: print(*x, sep="\\n")\nprintH = lambda x: print(" ".join(map(str,x)))\ndef IS(): return sys.stdin.readline()[:-1]\ndef II(): return int(sys.stdin.readline())\ndef MI(): return map(int, sys.stdin.readline()... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s191341655', 's371968057', 's907388003', 's938285380'] | [43068.0, 42888.0, 42672.0, 25692.0] | [354.0, 1623.0, 371.0, 121.0] | [813, 815, 803, 814] |
p02725 | u626228246 | 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()))\nfor i in range(n):\n if a[i] >= k/2:\n a[i] = a[i] -k\nprint(max(a)-min(a))\n', 'k,n = map(int,input().split())\na = list(map(int,input().split()))\nfor i in range(n):\n if a[i] >= k/2\n a[i] = a[i] -k\nprint(max(a)-min(a))', 'k,n = map(int,i... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s201334876', 's215275789', 's363609732', 's846829635'] | [32292.0, 8676.0, 32236.0, 32216.0] | [111.0, 25.0, 129.0, 121.0] | [143, 141, 165, 177] |
p02725 | u629350026 | 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()\ntemp=a[0]+a[n-1]\nfor i in range(1,n):\n temp=max(temp,a[i]-a[i-1])\nprint(k-temp)', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\na.sort()\ntemp=a[0]+a[n-1]\nfor i in range(1,n):\n temp=max(ans,a[i]-i[i-1])\nprint(k-temp)'... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s239840672', 's484932814', 's767879901', 's821033284'] | [26436.0, 26444.0, 26444.0, 25836.0] | [140.0, 69.0, 67.0, 140.0] | [151, 150, 151, 153] |
p02725 | u638847754 | 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())\nmtrx=list(map(int,input().split()))\nmtrx.append(K)\nlength = []\nfor i in range(len(mtrx)-1):\n length.append(mtrx[i+1]-mtrx[i])\nprint(K-max(length))', 'K,N=map(int,input().split())\nmtrx=list(map(int,input().split())) \nmtrx.append(K+mtrx[0])\nlength = []\nfor i in range(len(mtrx)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s278422301', 's445334994', 's623423089'] | [25840.0, 25836.0, 25796.0] | [117.0, 128.0, 119.0] | [178, 202, 188] |
p02725 | u641393644 | 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 ... | ['l = input().split(" ")\nj = input().split(" ")\nk = int(m[0])\nn = int(m[1])\nA = []\nfor i in range(j):\n d1 = j[i+1] - j[i]\n d2 = j[i+2] - j[i+1]\n min = min(d1,d2)\n A.append(int(min))\nprint(A)', "KN = input().split(' ')\nK = int(KN[0])\nN = int(KN[1])\nM = K/2\nAl = input().split(' ')\nA = []\n\n\ndef dista... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s169154146', 's412943941', 's451897698', 's512043309', 's533008007', 's558438919', 's761412097', 's773376168', 's857606226', 's121550992'] | [18508.0, 28720.0, 18484.0, 26444.0, 18508.0, 17948.0, 18508.0, 18508.0, 17948.0, 18508.0] | [34.0, 248.0, 34.0, 94.0, 34.0, 200.0, 33.0, 199.0, 33.0, 211.0] | [192, 337, 206, 397, 186, 170, 186, 172, 208, 212] |
p02725 | u641460756 | 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, l = map(int, input().split())\na = list(map(int, input().split()))\na.insert(0, 0)\na.append(k)\ne = []\nfor i in range(len(a)-1):\n e.append(a[i + 1] - a[i])\nans = sum(e) - max(e)-(e[1]-e[0])-(e[-1]-e[-2])\nprint(ans)', 'k, l = map(int, input().split())\na = list(map(int, input().split()))\ne = []\nfor i in r... | ['Wrong Answer', 'Accepted'] | ['s837565049', 's975240565'] | [26444.0, 26436.0] | [122.0, 118.0] | [217, 193] |
p02725 | u644568755 | 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_a = list(map(int, input().split()))\n\nx = 0\nlongest = 0\nfor a in list_a:\n if a - x > longest:\n longest = a - x\n x = a - x\nif longest < a[0] + (k - a[n-1]):\n longest = a[0] + (k - a[n-1]):\nprint(k-longest)', 'k, n = map(int, input().split())\nlist_a = list(map(in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s449482360', 's506809641', 's986878877'] | [2940.0, 26444.0, 26420.0] | [17.0, 117.0, 95.0] | [249, 249, 263] |
p02725 | u646203242 | 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()))\nj=[int(k+a[1]-a[-1])]\nfor i in range(n-1):\n j.append(a[i+1]-a[i])\nprint(k-max(j))\n', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\nj=[int(k-a[-1])]\nfor i in range(n-1):\n j.append(a[i+1]-a[i])\nprint(k-max(j))', 'k,n=map(int... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s250545825', 's439952662', 's444879175', 's670745839', 's656032438'] | [26444.0, 25836.0, 2940.0, 26420.0, 26420.0] | [117.0, 120.0, 17.0, 66.0, 120.0] | [147, 141, 133, 144, 147] |
p02725 | u646892595 | 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()))\nsub = [A[0]+K-A[N-1]]\nprint(A)\nfor _ in range(N-1):\n p = A.pop()\n sub.append(K-p)\n K = p\nprint(sub)\nsub.remove(max(sub))\nprint(sum(sub))', 'K, N = map(int,input().split())\nA = list(map(int, input().split()))\nsub = [A[0]]\n\nfor _... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s235407824', 's530756131', 's564557894', 's251668582'] | [25840.0, 26436.0, 25840.0, 25452.0] | [165.0, 152.0, 149.0, 134.0] | [213, 195, 210, 199] |
p02725 | u647287452 | 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, *A = map(int, open(0).read().split())\nB = []\nfor i in range(N - 1):\n B.append(A[i + 1] - A[i])\nB.append(K - A[-1] + A[0])\nprint(B)\nprint(K - max(B))\n', 'K, N, *A = map(int, open(0).read().split())\nB = []\nfor i in range(N - 1):\n B.append(A[i + 1] - A[i])\nB.append(K - A[-1] + A[0])\nprint(K - max... | ['Wrong Answer', 'Accepted'] | ['s627698927', 's584902510'] | [25124.0, 25124.0] | [130.0, 114.0] | [158, 149] |
p02725 | u647796955 | 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\nlines = sys.stdin.readlines() \n\nKN = lines[0].strip(" ")\nA = lines[1].strip(" ")\n\nK=int(KN[0])\n\nX = K - int(A[-1])\ntemp = 0\nfor Ai in A:\n Y = int(Ai) - temp\n if Y > X:\n X = Y\n temp = int(Ai)\n\nprint(K-X)\n \n', 'import sys\nlines = sys.stdin.readlines() \n\nKN = input().strip(" ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s003377444', 's591803279', 's982206344', 's708340538'] | [5748.0, 5748.0, 5876.0, 26444.0] | [19.0, 21.0, 20.0, 168.0] | [250, 248, 229, 179] |
p02725 | u648212584 | 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\ninput = sys.stdin.buffer.readline\n\ndef main():\n L,N = map(int,input().split())\n a = list(map(int,input().split()))\n \n ans = 0\n for i in range(N-1):\n ans = max(ans,a[i+1]-a[i])\n \n ans = max(ans,N+a[0]-a[-1])\n \n print(L-ans)\n \nif __name__ == "__main__":... | ['Wrong Answer', 'Accepted'] | ['s312475574', 's508296448'] | [20420.0, 20428.0] | [135.0, 198.0] | [315, 352] |
p02725 | u654517927 | 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 ... | ['date0=input().rstrip().split(" ")\ndate1=input().rstrip().split(" ")\nlist0=[]\nlist1=[]\nfor i in range(int(date0[1])):\n list0.append(int(date1[i]))\n#print(list0)\nlist0=sorted(list0)\n#print(list0)\nfor j in range(int(date0[1])-1):\n list1.append(list0[j+1]-list0[j])\nlist1.append(int(date0[0])-list0[int(date0[... | ['Wrong Answer', 'Accepted'] | ['s514983635', 's506544991'] | [28080.0, 28080.0] | [175.0, 182.0] | [377, 358] |
p02725 | u654697086 | 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\nper_dist = list(A[i+1]-A[i] for i in range(0,N-1))\nlast_dist = A[0] + K - A[N]\nper_dist = per_dist.append(last_dist)\nmax_dist = max(per_dist)\nprint(K - max_dist)', 'K_N_nyuryoku = input().split()\nK = int(K_N_nyuryoku[0])\nN = int(K_N_nyuryoku[... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s054894348', 's238196281', 's330998159', 's377425479', 's678549782', 's793669622'] | [26444.0, 26444.0, 26444.0, 26444.0, 26420.0, 26444.0] | [103.0, 115.0, 110.0, 98.0, 108.0, 103.0] | [228, 186, 177, 232, 137, 237] |
p02725 | u655048024 | 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 i in range(N-1):\n if(a[i+1]>a[i]):\n k=a[i+1]-a[i]\n else:\n k=a[i]-a[i+1]\n ans = max(k,ans)\nans = K-ans\n\n ', 'K,N = map(int,input().split())\na = list(map(int,input().split()))\nans = 0\nfor i in range(N-1):\n m=a[i+1]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s530018672', 's974188814', 's710431161'] | [26436.0, 26420.0, 25796.0] | [199.0, 154.0, 145.0] | [192, 187, 198] |
p02725 | u657183715 | 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()]\na.append(k)\nl=[]\nfor i in range(len(a)-1):\n s = a[i+1]-a[i]\n if s<0:\n s=-s\n l.append(s)\nmax_value=max(l)\nprint(k-max_value)', 'k,n=[int(x) for x in input().split()]\na=[int(x) for x in input().split()]\n\nif a[0]==0:\n... | ['Wrong Answer', 'Accepted'] | ['s451974207', 's426945197'] | [25452.0, 26420.0] | [139.0, 138.0] | [213, 287] |
p02725 | u658525821 | 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(input())\nA = list(map(int, input().split()))\nm = K + A[0] - A[N-1]\nfor i in range(N-1):\n d = A[i+1] - A[i]\n if d > m:\n m = d\nprint(K-m)\n', 'K, N = int(input())\nA = list(map(int, input().split()))\nm = K + A[0] - A[N-1]\nfor i in range(N-1):\n d = A[i+1] - A[i]\n m = max([d, m])\nprint(K-m)'... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s699952918', 's831581129', 's115096099'] | [3060.0, 3060.0, 26444.0] | [17.0, 17.0, 179.0] | [152, 147, 161] |
p02725 | u660018248 | 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 ... | ['if __name__ == "__main__":\n k, n = map(int, input().split())\n a = list(map(int, input().split()))\n import numpy as np\n a = np.array(a)\n\n kouho = a[0] + (k - a[-1])\n\n sa = a[1:] - a[0: -1]\n\n kouho1 = k - max(sa)\n\n print(max(kouho,kouho1))\n', 'if __name__ == "__main__":\n k, n = ... | ['Wrong Answer', 'Accepted'] | ['s268605576', 's966140465'] | [30136.0, 30632.0] | [1361.0, 407.0] | [262, 276] |
p02725 | u660640166 | 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 ... | ['\nfrom sys import stdin\nimport sys\nsys.setrecursionlimit(10**8)\n\ndef getInputs():\n\tinputs=[]\n\tfor line in stdin:\n\t\tline=line.split()\n\t\tinputs.append(line)\n\treturn inputs\n\ndef main(inputs):\n\tk,n=getIntList(inputs[0])\n\taList=getIntList(inputs[1])\n\t\n\td=k-aList[n-1]+aList[0]\n\tdi=n-1\n# \tprint... | ['Runtime Error', 'Accepted'] | ['s740557315', 's115503373'] | [18292.0, 25308.0] | [35.0, 98.0] | [483, 535] |
p02725 | u660899380 | 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)\nhouses = list(map(int, input().split()))\nmaxDistance = 0\ndistance = 0\nfor i in range(N):\n firstHouse = houses[i]\n lastHouse = houses[i - 1]\n if lastHouse > firstHouse:\n distance = lastHouse - firstHouse\n else:\n distance = (K - firstHouse) + lastHouse\... | ['Wrong Answer', 'Accepted'] | ['s771541089', 's023911411'] | [26444.0, 26060.0] | [148.0, 158.0] | [377, 404] |
p02725 | u664907598 | 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\nfor i in range(n-1):\n b[i] = a[i+1] - a[i]\nb[n-1] = k - a[n-1]\nprint(k-max(b))', 'k,n = map(int,input().split())\na = list(map(int,input().split()))\nb = [0] * n\nfor i in range(n-1):\n b[i] = a[i+1] - a[i]\nb[n-1] = k - a[n-1... | ['Wrong Answer', 'Accepted'] | ['s544649252', 's669600198'] | [26444.0, 26444.0] | [111.0, 117.0] | [160, 167] |
p02725 | u665038048 | 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(a[0] + k)\na_sub = [0] * (n - 1)\nfor i in range(n):\n a_sub[i] = a[i+1] - a[i]\nprint(k - max(a_sub))\n', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\na.append(a[0] + k)\na_sub = [0] * (n - 1)\nfor i in rang... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s257819359', 's353302889', 's012028281'] | [25580.0, 26444.0, 26444.0] | [113.0, 114.0, 118.0] | [180, 182, 176] |
p02725 | u667084803 | 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\nprint(min(K-A[0], A[-1]))', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nans = A[-1] - A[0]\nfor i in range(N-1):\n ans = min(ans, A[i] - A[i+1] + K)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s348782170', 's063418009'] | [26420.0, 26420.0] | [67.0, 165.0] | [95, 156] |
p02725 | u670180528 | 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,*a=map(int,open(0).read().split())\na+=[k+a[0]]\nprint(min(y-x for x,y in zip(a,a[1:])))', 'k,n,*a=map(int,open(0).read().split())\na+=[k+a[0]]\nprint(k-max(y-x for x,y in zip(a,a[1:])))'] | ['Wrong Answer', 'Accepted'] | ['s978022515', 's374195805'] | [25124.0, 25124.0] | [82.0, 81.0] | [90, 92] |
p02725 | u672475305 | 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()))\nr = 0\nfor i in range(1, n):\n r = max(r, A[i]-A[i-1])\nr = max(r, k-A[-1])\nprint(k-r)', 'k,n = map(int,input().split())\nA = list(map(int,input().split()))\nr = 0\nfor i in range(1, n):\n r = max(r, A[i]-A[i-1])\nprint(k-r)', 'k,n = map(int,i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s719811128', 's753507192', 's295683604'] | [26444.0, 26444.0, 26436.0] | [136.0, 142.0, 116.0] | [152, 132, 169] |
p02725 | u672898046 | 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\na.append(k+a[0])\n\nprint("k+a[0]:",k+a[0])\nd = 0\n\nfor i in range(n):\n d = max(d, a[i+1]-a[i])\n \nprint(k-d)', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\n\na.append(k+a[0])\n\nd = 0\n\nfor i in range(n):\n... | ['Wrong Answer', 'Accepted'] | ['s259718439', 's789943987'] | [32296.0, 32168.0] | [127.0, 127.0] | [253, 229] |
p02725 | u674052742 | 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"""\nCreated on Sat Mar 28 21:11:28 2020\n\n@author: Kanaru Sato\n"""\n\nk,n = list(map(int, input().split()))\na = list(map(int, input().split()))\ndl = []\n\nfor i in range(n-1):\n d = a[i+1]-a[i]\n if d > k/2:\n d = k-d\n dl.append(d)\n\nd = a[n-1]-a[0]\nif d > k/2:\n d ... | ['Wrong Answer', 'Accepted'] | ['s531551897', 's773266745'] | [25840.0, 25836.0] | [180.0, 162.0] | [356, 346] |
p02725 | u674588203 | 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(A[0]+K)\n\nD=[]\nfor i in range(len(A)-1):\n d=A[i+1]-A[i]\n D.append(D)\n\nprint(K-max(D))', 'K,N=map(int,input().split())\nA=list(map(int,input().split()))\nA.append(A[0]+K)\n\nD=[]\nfor i in range(len(A)-1):\n d=A[i+1]-A[i]\n D.ap... | ['Runtime Error', 'Accepted'] | ['s121359995', 's742486567'] | [26420.0, 26824.0] | [2104.0, 125.0] | [161, 161] |
p02725 | u676458682 | 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(A[0]+K)\nl=0\nfor i in range(N-1):\n l=max(l,A[i+1]-A[i])\n \nprint(K-l)', 'K,N=map(int,input().split())\nA=list(map(int,input().split()))\n\nmax = K-A[-1]+A[0]\nfor i in range(N-1):\n if last < A[i+1]-A[i]:\n max = A[i+1]-A[i]\n\np... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s509835988', 's645032848', 's711659892', 's857465833'] | [26444.0, 26436.0, 26444.0, 26444.0] | [163.0, 65.0, 143.0, 167.0] | [141, 169, 144, 148] |
p02725 | u676939443 | 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()))\n\na.append(k)\n\nbig = 0\nbig_count = a[0]\n\nfor i in range(n):\n b = a[i + 1] - a[i]\n print(b)\n if b > big_count:\n print('ここ')\n big_count = b\n big = i\n\nif big == 0:\n ans = a[n - 1] - a[0]\nelse:\n an... | ['Wrong Answer', 'Accepted'] | ['s881248829', 's278271512'] | [26436.0, 25840.0] | [258.0, 126.0] | [339, 220] |
p02725 | u684267998 | 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\nS = [0]*(N+1)\n\nfor i in range(N):\n if i==N-1:\n S[i+1] = A[i] - K + A[0]\n else:\n S[i+1] = A[i+1] - A[i]\n\nSmax = S.index(max(S))\n\nans = sum(S)-S[Smax]\nprint(ans)', 'K,N = map(int,input().split())\nA = list(map(int,input... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s082068165', 's176897794', 's794565501', 's442641529'] | [25840.0, 26444.0, 26444.0, 25836.0] | [144.0, 141.0, 130.0, 136.0] | [246, 243, 244, 246] |
p02725 | u686036872 | 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(map(int, input().split()))\n\nlength = K//2\nfor i in range(N-1):\n length = max(A[i+1] - A[i] , length)\n if lenghth == A[i+1] - A[i]:\n ans = A[i] + K - A[i+1]\n \nif length == K//2:\n ans = A[-1] - A[0]\nprint(ans)', 'K, N = map(int, input().split()... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s577731582', 's954334276', 's438864516'] | [26444.0, 26444.0, 26444.0] | [70.0, 68.0, 215.0] | [272, 271, 295] |
p02725 | u687135117 | 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\nimport sys\nreadline = sys.stdin.buffer.readline\nK, N = map(int, readline().split())\nA = list(map(int,input().split()))\nN1= A[0]+K-A[N-1]\n\nfor i in range(1, N):\n N=max(N,A[i]-A[i-1])\n\nprint(N,N1)\nc = min(K-N1,K-N)\nprint(c)', 'import numpy as np\nimport sys\nreadline = sys.stdin.buffer.re... | ['Wrong Answer', 'Accepted'] | ['s608319503', 's495319674'] | [34164.0, 34168.0] | [274.0, 271.0] | [240, 215] |
p02725 | u689890477 | 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()]\nb = [0] *(n)\nfor i in range(n-1):\n b[i] =a[i+1]-a[i]\nb[n] = a[0] + k - a[n-1]\n\nprint(k - max(b))\n', 'k, n = map(int,input().split())\na = [int(x) for x in input().split()]\nb = [0] *(n)\nfor i in range(n-1):\n b[i] =a[i+1]-a[i]\nb[n-1... | ['Runtime Error', 'Accepted'] | ['s290546020', 's124497495'] | [26444.0, 26436.0] | [118.0, 119.0] | [170, 172] |
p02725 | u692687119 | 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()))\nD = []\n\nfor i in range(0,N-1):\n d = A[i + 1] - A[i]\n D.append(abs(d))\n \nd2 = A[N-1] - K\nD.append(abs(d2))\n\nkankaku = max(D)\nsaitan = K - kankaku\n\nprint(saitan)', 'K, N = map(int, input().split())\n\nA = list(map(int, input().split... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s234527184', 's918716477', 's601780540'] | [26420.0, 26436.0, 26060.0] | [127.0, 130.0, 129.0] | [232, 221, 241] |
p02725 | u694665829 | 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()))]\ndel A[index(min(A))]\nfor a in A:\n a-=min(A)\nprint(max(A)-min(A))', 'K,N=map(int,input().split())\nA=[list(map(int,input().split()))]\nprint(max(A)-min(A))', 'K,N=map(int,input().split())\nA=list(map(int,input().split()))\nB=sorted(A)\nC=[]\nfor i i... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s375726722', 's521579956', 's023521860'] | [26444.0, 26060.0, 26436.0] | [70.0, 65.0, 122.0] | [129, 84, 165] |
p02725 | u695261159 | 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\nmax_distance = k - a[-1] - a[0]\nstr_index = 0\ngl_index = -1\nfor i in range(n):\n if i == 0:\n continue\n elif max_distance < abs(a[i-1] - a[i]):\n max_distance = abs(a[i-1] - a[i])\n str_index = i-1\n gl_index = i... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s165732521', 's553932228', 's642429409', 's241278031'] | [25840.0, 26444.0, 2940.0, 26444.0] | [124.0, 127.0, 17.0, 125.0] | [346, 440, 346, 418] |
p02725 | u695567036 | 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(float, input().split())\nm = list(map(float, input().split()))\nmin = float(0)\nhalf_k = k / 2\nfor i in range(n):\n first = m[i]\n last = m[i-1]\n len = last - first\n if len < 0:\n len = len + k\n if min < len:\n min = len\nprint(int(min))\n', 'k, n = map(float, input().split... | ['Runtime Error', 'Accepted'] | ['s902193442', 's874206476'] | [23916.0, 24780.0] | [67.0, 166.0] | [270, 281] |
p02725 | u698560572 | 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 ... | ['s = input().split(" ")\nk = int(s[0])\nn = int(s[1])\n\nd = input().split(" ")\ndist = []\n\nfor i in range(0,n):\n dist.append(int(d[i]))\n\nex = dist[0] + k - dist[n-1]\nres = k - ex\n\nfor i in range(1, n):\n \tdiff = dist[i] - dist[i-1]\n aux = res + ex - diff\n \n if aux < res:\n res = aux\n ... | ['Runtime Error', 'Accepted'] | ['s516069229', 's389990855'] | [3060.0, 26444.0] | [19.0, 151.0] | [332, 275] |
p02725 | u699296734 | 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()]\narray=[a[n-1]-a[0]]\narray.append(result)\nfor i in range(1,n):\n array.append(k+a[i-1]-a[i])\nprint(min(array))\n', 'k,n=map(int,input().split())\na=[int(i) for i in input().split()]\narray=[a[n-1]-a[0]]\narray.append(result)\nfor i in range(1,n):\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s184515490', 's313711601', 's759979756'] | [26436.0, 26420.0, 26444.0] | [75.0, 74.0, 145.0] | [175, 176, 230] |
p02725 | u699696451 | 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()))\ngap = []\n\nfor i in range(N):\n if i < N - 1:\n sa = A[i+1] - A[i]\n else:\n sa = A[0] + (K - A[N-1])\n print(sa)\n gap.append(sa)\n i += 1\n \ndist = max(gap)\nans = K - dist\nprint(ans)\n', 'K, N = map(int,input().... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s155811831', 's766183647', 's645175673'] | [26444.0, 25840.0, 25452.0] | [303.0, 301.0, 160.0] | [275, 279, 261] |
p02725 | u699912843 | 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\nfor i, d in enumerate(a):\n if i != 0:\n a[i] = d - a[i - 1]\n else:\n a[i] = d + 20 - a[n - 1]\n\na.sort(reverse=True)\nprint(k - a[0])', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\na2 = []\nfor i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s680812280', 's717098333', 's198210318'] | [26444.0, 26444.0, 25840.0] | [147.0, 206.0, 146.0] | [219, 260, 264] |
p02725 | u699944218 | 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, K = list(map(int,input().split()))\nA = list(map(int,input().split()))\nd = [A[i+1]-A[i] for i in range(N-1)]\nde = K - A[N-1] + A[0]\ndis = 0\nfor i in range(N-2):\n dis += d[i]\nif d[N-2] <= de:\n dis += d[N-2]\nelse:\n dis += de\nprint(dis)', 'K, N = list(map(int,input().split()))\nA = list(map(int,input().s... | ['Runtime Error', 'Accepted'] | ['s055282581', 's448615969'] | [25840.0, 26444.0] | [93.0, 153.0] | [238, 214] |
p02725 | u701638736 | 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 = input().split()\n\na_list = list(A)\n\ndist = 0\nmax = 0\nsum = 0\n\nfor i in range(len(a_list)):\n if i == len(int(a_list)) - 1:\n dist = abs(int(a_list[i]) - int(a_list[0]))\n else:\n dist = abs(int(a_list[i]) - int(a_list[i + 1]))\n \n if max < dist:\n sum += max\n max = ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s477262597', 's611708102', 's145051192'] | [19680.0, 21940.0, 20044.0] | [39.0, 497.0, 247.0] | [348, 436, 421] |
p02725 | u702018889 | 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(a[0]+k)\nal=[a[i+1]-a[i] for i in range(n)]\nprint(k-max(al))', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\na.append(a[0]+k)\nal=[a[i+1]-a[i] for i in range(n)]\nprint(k-max(al))'] | ['Runtime Error', 'Accepted'] | ['s161217631', 's489526320'] | [2940.0, 26060.0] | [17.0, 97.0] | [129, 130] |
p02725 | u703461446 | 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 calc(K, N, A):\n A.sort()\n B = [A[i + 1] - A[i] for i in range(N - 1)]\n return K - max(B)\n\n\n(K, N) = tuple([int(s) for s in input().split()])\nA = [int(s) for s in input().split()]\nprint(calc(K, N, A))', 'def calc(K, N, A):\n B = [A[i + 1] - A[i] for i in range(N - 1)] + [A[0] + K - A[N - 1]]\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s245627248', 's377357022', 's129624165'] | [26436.0, 26000.0, 26436.0] | [100.0, 114.0, 98.0] | [212, 236, 223] |
p02725 | u707030679 | 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\nB=[]\nt=0\nfor a in A:\n B.append(a-t)\n t=a\nB[0] +=k-t\n\nprint(B, k-max(B) )', 'k,n = map(int,input().split())\nA = list(map(int,input().split()))\n\nB=[]\nt=0\nfor a in A:\n B.append(a-t)\n t=a\nB[0] +=k-t\n\nprint(k-max(B) )'] | ['Wrong Answer', 'Accepted'] | ['s127212729', 's018920720'] | [32240.0, 32368.0] | [110.0, 98.0] | [145, 142] |
p02725 | u707498674 | 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()))\ndiff_list = []\nsum_val = 0\n\ndiff_list.append(K-A[-1] + A[0])\nfor i in range(1, N):\n diff_list.append(A[i]-sum_val)\n sum_val += A[i]\n\nprint(sum(diff_list)-max(diff_list))', 'K, N = map(int, input().split())\nA = list(map(int, input().... | ['Wrong Answer', 'Accepted'] | ['s899232895', 's796505789'] | [26444.0, 26436.0] | [146.0, 118.0] | [244, 213] |
p02725 | u708890186 | 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(_) for _ in input().split()]\na=0\nfor i in range(N-1):\n tmp=A[i+1]-A[i]\n if a<tmp:\n a=tmp\n\nprint(min(K-a,A[0]))\n', 'K,N=map(int,input().split())\nA=[int(_) for _ input().split()]\na=0\nfor i in range(N-1):\n tmp=A[i+1]-A[i]\n if a<tmp:\n a=tmp\nprint(K-a)', 'K,N=m... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s310490899', 's366322634', 's575244154', 's713431350', 's500696495'] | [24948.0, 2940.0, 26436.0, 26436.0, 26444.0] | [116.0, 18.0, 116.0, 116.0, 118.0] | [152, 137, 145, 141, 154] |
p02725 | u709040648 | 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 a=list(map(int,input().split()))\n max_d=0\n for i in range(n):\n x=0\n if i==n-1:\n if a[0]==0:\n x=k-a[i]\n else:\n x=k-a[i]+a[0]\n else:\n x=a[i+1]-a[i]\n if x>max_d:\n max_d=x\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s583792842', 's584097600', 's798028877'] | [2940.0, 3064.0, 26444.0] | [17.0, 18.0, 130.0] | [323, 361, 271] |
p02725 | u709799578 | 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.append(K)\ndist = [0]*(N+1)\n\ndist[0] = a[N-1] - K - a[0]\nfor i in range(len(a)-1):\n dist[i+1] = a[i+1] - a[i]\n\ndist.pop()\ndist.remove(max(dist))\nans = abs(min(dist)) + abs(max(dist))\nprint(ans)', 'K, N = map(int, input().split())\n... | ['Wrong Answer', 'Accepted'] | ['s081238907', 's421221633'] | [24948.0, 26444.0] | [134.0, 118.0] | [268, 195] |
p02725 | u711238850 | 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 = tuple([int(t)for t in input().split()])\n a = [int(t)for t in input().split()]\n\n l = 0\n dist = []\n for a_i in a[1:]:\n dist.append(a_i-l)\n l = a_i\n dist.append(k-a[-1]+a[0])\n print(dist)\n print(k-max(dist))\n\nif __name__ == "__main__":\n main()', '... | ['Wrong Answer', 'Accepted'] | ['s685157744', 's400919594'] | [26420.0, 26444.0] | [107.0, 91.0] | [300, 288] |
p02725 | u713914478 | 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 for i in range(N)]\nprint(A)\nprint(B)\n\n\nfor i in range(N-1):\n\tB[i] = A[i+1] - A[i]\n\nB[N-1] = K - (A[N-1] - A[0])\nB_max = max(B)\nprint(B)\nprint(K - B_max)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\... | ['Wrong Answer', 'Accepted'] | ['s543365849', 's129073236'] | [26444.0, 26420.0] | [164.0, 123.0] | [229, 201] |
p02725 | u714931250 | 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.strip()) for x in input().split()]\nfor i in range(n):\n if i != 0 and i != n-1:\n dist_r = a[i-1] + (k - a[i])\n dist_l = a[i] + (k - a[i+1])\n min_dist = min(dist_r,dist_l)\n elif i == 0:\n dist_r = a[n-1] + (k - a[i])\n dist_l = a[i] + (k - a[i+1])\n ... | ['Wrong Answer', 'Accepted'] | ['s680236713', 's871138940'] | [33668.0, 33584.0] | [195.0, 197.0] | [496, 538] |
p02725 | u720636500 | 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(a[0]+k-a[-1])\nl = max(a)\nprint(k-l)', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\na.append(a[0]+k)\nl = 0\nfor i in range(n):\n l = max(l,a[i+1]-a[i])\nprint(k-l)'] | ['Wrong Answer', 'Accepted'] | ['s629826762', 's844737067'] | [26420.0, 26444.0] | [68.0, 161.0] | [113, 146] |
p02725 | u723345499 | 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\nm = 0\nfor i in range(n-1):\n d = a[i+1] - a[i]\n m = max(m, d)\nd_last = k - a[n-1]\nm = max(m, d_last)\n\nres = k - m\nprint(res)', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\n\nm = 0\nfor i in range(n-1):\n ... | ['Wrong Answer', 'Accepted'] | ['s905250152', 's592808814'] | [26436.0, 26100.0] | [148.0, 165.0] | [199, 206] |
p02725 | u726218285 | 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(filter(lambda x: x != 0, (int(x) for x in input().split())))\nprint(sum(A) / len(A))\n', 'K, N = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\nm = A[min(((i, abs(max(A) / 2 - n)) for i, n in enumerate(A)), key=lambda x: x[1])[0]]\nprint(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001170244', 's533558186', 's461898534'] | [26420.0, 26420.0, 26828.0] | [104.0, 2104.0, 156.0] | [134, 215, 588] |
p02725 | u731368968 | 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()))\n\na = [A[i + 1] - A[i] for i in range(N - 1)]\na.append(K + A[0] - A[-1])\n\na.sort()\nprint(a)\nprint(sum(a[:-1]))\n', 'K, N = map(int, input().split())\n\nA = list(map(int, input().split()))\n\na = [A[i + 1] - A[i] for i in range(N - 1)]\na.ap... | ['Wrong Answer', 'Accepted'] | ['s921799845', 's498669913'] | [25832.0, 26444.0] | [139.0, 122.0] | [180, 171] |
p02725 | u736641785 | 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\nMIN_LIST = A[0]+(K - A[N-1])\nfor i in range(N-1):\n MIN_LIST = max(MIN_LIST,(A[i+1]-A[i]))\n print(A[i+1]-A[i])\n\nprint(K - MIN_LIST)', 'K, N = map(int,input().split())\nA = list(map(int,input().split()))\n \nMIN_LIST = A[0]+(K - A[N-1]... | ['Wrong Answer', 'Accepted'] | ['s686078685', 's467752836'] | [26436.0, 26060.0] | [305.0, 149.0] | [204, 189] |
p02725 | u738898077 | 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]*n\nfor i in range(n-1):\n ans[i] = a[i+1] - a[i]\nans[-1] = (k-a[-1])\nprint(k - max(ans) )', 'k,n = map(int,input().split())\na = list(map(int,input().split()))\ndist = []\nkankaku_max = 0\nfor i in range(n-1):\n dist.append(a[i+1]-a[i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s351879883', 's527963070', 's009021229'] | [26060.0, 26444.0, 26444.0] | [115.0, 156.0, 159.0] | [166, 236, 239] |
p02725 | u745687363 | 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=[]\nfor i in range(n):\n A.append(int(input()))\nB=[]\nfor i in range(n-1):\n B.append(A[i+1]-A[i])\nB.append(k-A[n-1]+A[0])\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[... | ['Runtime Error', 'Accepted'] | ['s176123803', 's090357039'] | [5824.0, 26444.0] | [26.0, 117.0] | [171, 157] |
p02725 | u746206084 | 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())\nli=list(map(int,input().split()))\nM=0\nfor i in range(n-1):\n if li[i+1]-li[i]>M:\n M=li[i+1]-li[i]\nif m-li[-1]>M:\n M=m-li[-1]\nprint(M)', 'm,n=map(int,input().split())\nli=list(map(int,input().split()))\nM=0\nfor i in range(n-1):\n if li[i+1]-li[i]>M:\n M=li[i+... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s189609397', 's641648845', 's562477616'] | [26420.0, 26444.0, 26420.0] | [102.0, 101.0, 115.0] | [174, 176, 173] |
p02725 | u747391638 | 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(" "))\nalist = list(map(int, input().split(" ")))\nglist = []\nfor i in range(n-1):\n glist.append(alist[i+1]-alist[i])\nglist.append(k+a[0]-a[n-1])\n\nprint(k-max(glist))\n', 'k ,n = map(int, input().split(" "))\nalist = list(map(int, input().split(" "))\nglist = []\nfor i in range(n-1... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s097389674', 's318995783', 's655367911'] | [25836.0, 3064.0, 26420.0] | [113.0, 17.0, 114.0] | [194, 220, 201] |
p02725 | u747602774 | 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,k = map(int,input().split())\na = list(map(int,input().split()))\nans = a[0] + k - a[-1]\nfor i in range(n-1):\n ans = max(ans, a[i+1]-a[i])\nprint(k-ans)', 'k,n = map(int,input().split())\na = list(map(int,input().split()))\nans = a[0] + k - a[-1]\nfor i in range(n-1):\n ans = max(ans, a[i+1]-a[i])\nprint(k-ans)... | ['Runtime Error', 'Accepted'] | ['s898529239', 's611031676'] | [26436.0, 26420.0] | [160.0, 150.0] | [152, 152] |
p02725 | u748311048 | 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()))\nK=[]\nfor i in range(N):\n if i==N-1:\n K.append((K-A[i])+A[1])\n else:\n K.append(A[i+1]-A[i])\n\nprint(N-max(K))', 'K,N=map(int, input().split())\nA=list(map(int, input().split()))\nC=[]\nfor i in range(N):\n if i==N-1:\n C.append((K-A[i]... | ['Runtime Error', 'Accepted'] | ['s680927551', 's407077667'] | [26444.0, 26060.0] | [130.0, 135.0] | [179, 179] |
p02725 | u755545520 | 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=0\nfor i in range(n-1):\n p=a[i+1]-a[i]\n if p >= x:\n x=p\n\nX=max(x,k-a[n-1]-a[0])\nprint(k-X)', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\n\nx=0\nfor i in range(n-1):\n p=a[i+1]-a[i]\n if p >= x:\n x=p\n \nprint(k-x)', 'k,... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s243665492', 's612899048', 's875990689', 's606980851'] | [26420.0, 26420.0, 26444.0, 25832.0] | [110.0, 116.0, 109.0, 120.0] | [155, 134, 155, 155] |
p02725 | u759412327 | 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()))+[K]\nD = [abs(A[n+1]-A[n]) for n in range(N)]\nprint(K-max(D))', 'K,N = map(int,input().split())\nA = list(map(int,input().split()))\nB = [A[n+1]-A[n] for n in range(N-1)]\nprint(K-max(B))', 'K,N = map(int,input().split())\nA = list(map(int,input().sp... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s353502137', 's495442575', 's754668016'] | [32244.0, 26444.0, 32368.0] | [105.0, 99.0, 103.0] | [126, 119, 135] |
p02725 | u762523240 | 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()))\nAp = []\nl = 0\n\nfor n in A:\n if n != 0 and n > K/2:\n Ap.append(n-K)\n else:\n Ap.append(n)\n\n\nfor i in range(N-1):\n l += abs(A[i]-A[i+1])\n\n\nAp.sort()\nlp = 0\nfor j in range(N-1):\n lp += abs(Ap[i]-Ap[i+1])\n\n\nif l >= lp:\n ... | ['Wrong Answer', 'Accepted'] | ['s301499432', 's920802000'] | [33624.0, 32388.0] | [211.0, 137.0] | [359, 327] |
p02725 | u763249708 | 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\nr_ans = 10**9\nif a[0] + a[n-1] >= k:\n r_ans = a[n-1] - a[0]\n # print(a[n-1] - a[0])\n\n\nelse:\n max_n = 0\n for i in range(n-1):\n diff = abs(a[i] - a[i+1])\n max_n = max(diff, max_n)\n # print(k - max_n)\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s262741500', 's626856891', 's734561484'] | [26444.0, 25840.0, 32368.0] | [164.0, 167.0, 146.0] | [376, 300, 241] |
p02725 | u763291354 | 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()))\n\nanswer = []\n\nfor i,home in enumerate(A):\n kouho = home - A[i - 1]\n if kouho < 0:\n answer.append(20 + kouho)\n else:\n aanswer.append(kouho)\n\nprint(20 - max(answer))\n', 'KN = list(map(int, input().split()))\nA =... | ['Runtime Error', 'Accepted'] | ['s237819798', 's522347296'] | [26444.0, 26444.0] | [65.0, 142.0] | [260, 263] |
p02725 | u763383823 | 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()))\nnew = []\nfor i in range(N-1):\n new.append(A[i+1]-A[i])\nnew.append(K + A[0] - A[-1])', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\nnew = []\nfor i in range(N-1):\n new.append(A[i+1]-A[i])\nne... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s009576998', 's249429121', 's260810018', 's381370847', 's927220391'] | [34152.0, 26444.0, 35856.0, 2940.0, 26436.0] | [244.0, 142.0, 269.0, 17.0, 144.0] | [174, 188, 207, 205, 187] |
p02725 | u765401716 | 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()))\nA.sort()\nP=[A[0]]\nfor i in range(len(A)-1):\n a = abs(A[i+1] -A[i])\n P.append(a)\nP.append(abs(K - A[-1] + A[0]))\nP.sort()\ndel P[-1]\nans = sum(P)\nprint(ans)\n', 'K,N = list(map(int, input().split()))\nA = list(map(int, input().sp... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s520177924', 's631540037', 's792582282', 's854569373', 's296336012'] | [26420.0, 26444.0, 26444.0, 26420.0, 26420.0] | [153.0, 71.0, 161.0, 172.0, 155.0] | [235, 149, 230, 221, 230] |
p02725 | u766566560 | 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()))\nsum = 0\n\nif A[0] == 0:\n for i in range(2, N):\n sum += abs(A[i-i] - A[i])\n print(sum)\nelse:\n for i in range(1, N):\n sum += abs(A[i-1] - A[i])\n print(i, sum)\n print(sum)', 'K, N = map(int, input().split())\nA = list(map(int, i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s075063361', 's845033134', 's490786341'] | [26420.0, 26420.0, 25452.0] | [385.0, 128.0, 106.0] | [249, 252, 175] |
p02725 | u766646838 | 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()) \nc=list(map(int, input().split())) \na = 0\nb = 0\nfor i in range(N):\n print(a)\n if i == 0:\n a = min((c[N-1]-c[0]),K-(c[i+1]-c[0]))\n elif i == N-1:\n a = min(a,K-(c[i-1]-c[i]))\n a = min(a,K-(c[0]-c[i]))\n \n else:\n a = min(a,K-(c[i-1]-c[i]))\n a = min(a,K-(c[... | ['Wrong Answer', 'Accepted'] | ['s063705479', 's233266153'] | [26444.0, 26444.0] | [424.0, 277.0] | [329, 323] |
p02725 | u767752954 | 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 ... | ['\nK,N = input().split()\nK = int(K)\nN= int(N)\nA = [int(x) for x in input().split()]\n\ndis=[]\nnow = 0\n\nfor i in range(N):\n dis.append(A[i] - now)\n now = A[i]\n\ndis.append(K - A[N -1])\n\ndistance = K - max(dis)\n\nprint(distance)', 'K,N = input().split()\nK = int(K)\nN= int(N)\nA = [int(x) for x in inpu... | ['Wrong Answer', 'Accepted'] | ['s268174886', 's755501225'] | [26420.0, 26420.0] | [126.0, 133.0] | [226, 229] |
p02725 | u767995501 | 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 ... | ['#!/usr/bin/env python3\n \nk, n = map(int, input().split())\nA = list(map(int, input().split()))\nA += [A[0] + K]\nmax_gap = max(y - x for x, y in zip(A, A[1:]))\nprint(K - max_gap)', '#!/usr/bin/env python3\n \nK, N = map(int, input().split())\nA = list(map(int, input().split()))\nA += [A[0] + K]\nmax_gap = max(y - ... | ['Runtime Error', 'Accepted'] | ['s233753372', 's808266817'] | [26444.0, 25840.0] | [75.0, 84.0] | [175, 175] |
p02725 | u768256617 | 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\na.append(a[-1]+k)\nl=0\nfor i in range(n):\n l=max(l,a[i+1]-a[i])\n \ns=k-l\nprint(s)', 'k,n=map(int,input().split())\na=list(map(int,input().split()))\n \na.append(a[0]+k)\nl=0\nfor i in range(n):\n l=max(l,a[i+1]-a[i])\n \ns=k-l\n\nprint(s)'] | ['Wrong Answer', 'Accepted'] | ['s899560778', 's077225971'] | [26436.0, 25832.0] | [151.0, 160.0] | [144, 145] |
p02725 | u769870836 | 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=list(map(int,input().split()))\nl=l+[l[0]]\nl=l[::-1]\nans=k\nfor i in range(n):\n ans=min(l[i+1]-l[i],k-(l[i+1]-l[i]))\nprint(ans)', 'k,n=map(int,input().split())\nimport numpy as np\nl=list(map(int,input().split()))\nl=np.array(l+[l[0]+k])\nprint(k-np.max(np.diff(l)))'] | ['Wrong Answer', 'Accepted'] | ['s937432201', 's715225118'] | [25836.0, 34144.0] | [189.0, 214.0] | [157, 131] |
p02725 | u771538568 | 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, k = map(int, input().split())\na = list(map(int, input().split()))\na.append(n)\nd=[]\nfor i in range(len(a)-1):\n d.append([i,a[i+1]-a[i]])\nd[-1][1]+=a[0]\nl=sorted(d,key=lambda x:x[1])\n\no=l[-1][0]\nif o==len(a)-1:\n g=a[-2]-a[0]\nelse:\n g=a[o]+n-a[o+1]\nprint(g)', 'n, k = map(int, input().split())\n... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s537822078', 's706672818', 's791752114', 's884988022', 's675555999'] | [43188.0, 38732.0, 43152.0, 49096.0, 43188.0] | [249.0, 191.0, 254.0, 436.0, 248.0] | [266, 206, 208, 209, 266] |
p02725 | u773686010 | 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 ... | ['# Traveling Salesman around Lake https://atcoder.jp/contests/abc160/tasks/abc160_c\nN,K= map(int, input().split())\n\nTravel_List=list(map(int,input().split()))\nfor i in range(K):\n Travel_List.append(Travel_List[i]+N)\n\nAnswer =0 \nfor i in range(K):\n print(i)\n Temp = Travel_List[i+K-1]-Travel_List[i]\n... | ['Wrong Answer', 'Accepted'] | ['s469712002', 's788601968'] | [26420.0, 26000.0] | [322.0, 168.0] | [384, 371] |
p02725 | u776311944 | 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\nA.insert(0, 0)\nA.append(K)\n\nprint(A)\n\nstart = A[1] - A[0]\ngoal = A[-1] - A[-2]\n\nmixi = 0\nsum_len = 0\n\nSorG = max(start, goal)\n\nfor i in range(len(A) - 1):\n if A[i+1] - A[i] > mixi:\n mixi = A[i+1] - A[i]\n sum_len += A... | ['Wrong Answer', 'Accepted'] | ['s797482784', 's007068968'] | [26444.0, 26444.0] | [164.0, 150.0] | [473, 498] |
p02725 | u779728630 | 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\nm = K - A[N-1] + A[0]\n\nfor i in range(N-1):\n m = min(m, A[i+1] - A[i])\n\nprint(K - m)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\n\nm = K - A[N-1] + A[0]\n\nfor i in range(N):\n m = min(m, A[i+1] - A[i])\n\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s673709387', 's889477697', 's331811617'] | [26444.0, 25840.0, 26436.0] | [164.0, 162.0, 150.0] | [156, 153, 156] |
p02725 | u780475861 | 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.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\nk, n, *lst = map(int, read().split())\nlst.sort()\ndis = 0\nfor i in range(n):\n if i == 0:\n dis = max(dis, k-lst[-1])\n else:\n dis = max(dis, lst[i] - lst[i - 1])\n\ndis = min(dis, k - dis)\npri... | ['Wrong Answer', 'Accepted'] | ['s833157976', 's578309074'] | [25124.0, 25124.0] | [152.0, 175.0] | [310, 294] |
p02725 | u785645123 | 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 ... | ['ddd = [input() for i in range(2)]\neee = ddd[0].split()\nfff = ddd[1].split()\nlongest_distance = 0\nfor i in range(len(fff) - 1):\n distance = int(fff[i+1]) - int(fff[i])\n if longest_distance < distance:\n longest_distance = distance\nshortest_road = int(eee[0]) - longest_distance\nprint(shortest_road)... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s042368514', 's073261047', 's709111949', 's808647852'] | [19112.0, 18508.0, 17948.0, 18508.0] | [176.0, 165.0, 34.0, 163.0] | [309, 334, 298, 349] |
p02725 | u785728112 | 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())\u3000\nA = list(map(int, input().split()))\nli = []\nfor i in range(N - 1):\n li.append(A[i + 1] - A[i]) \n\nli.append(abs(A[0] + (K - A[-1]))) \nprint(sum(li) - max(li))', 'K, N = map(int,input().split())\nA = list(map(int, input().split()))\nli = []\nfor i in range(N - 1):\n li.app... | ['Runtime Error', 'Accepted'] | ['s203594615', 's902822139'] | [9016.0, 32324.0] | [26.0, 109.0] | [193, 189] |
p02725 | u787131053 | 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 around(K,A):\n N2 = A.pop(0)\n A.append(N2+K)\n return A\n\nK,N = map(int, input().split(" "))\nA = list(map(int, input().split(" ")))\n\nX = 0\nX_min = 1000000000\nfor j in range(0,len(A)):\n X=0\n X = A[len(A)-1] - A[0]\n X_min = X\n A=around(K,A)\n \nprint(X_min)', 'def around(K,A):\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s613565523', 's898595002', 's027544355'] | [26420.0, 2940.0, 25836.0] | [2104.0, 17.0, 116.0] | [278, 299, 260] |
p02725 | u792455295 | 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())\n\nA = []\n\nfor i in range(N):\n A.append(int(input()))\n \nmax = A[0]\nmemo = 0\n\nfor i in range(N-1):\n if max < A[i+1]-A[i]:\n max = A[i+1]-A[i]\n\nif max < K-A[N-1]+A[0]:\n max = K-A[N-1]+A[0]\n \nprint(K-max)\n \n', 'K = int(input())\nN = int(input())... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s013308983', 's044341885', 's074904822', 's125365493', 's456347190', 's174667061'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 26060.0] | [18.0, 17.0, 18.0, 18.0, 17.0, 105.0] | [260, 249, 231, 258, 258, 182] |
p02725 | u793010149 | 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= list(map(int,input().split()))\nli = []\n\nfor i in range(n):\n li.append(l[n-1]-l[n-2])\n\nli.sort(reverse=True)\nprint(k-li[0])', 'k,n = map(int,input().split())\nl= list(map(int,input().split()))\nli = []\n\nfor i in range(n-1):\n li.append(l[n-i-1]-l[n-i-2])\n\nli.sort(reverse... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s391723287', 's392579570', 's434937044', 's152266671'] | [26060.0, 26444.0, 26060.0, 26436.0] | [120.0, 173.0, 177.0, 181.0] | [157, 164, 215, 215] |
p02725 | u796708718 | 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(" ")]\na.sort()\na.insert(0,a[-1])\nmax_d = 0\nfor i in range(0,N-1):\n if abs(a[i+1] - a[i]) >= max_d:\n max_d = abs(a[i+1] - a[i])\n\nprint(max_d,K-max_d)\n', 'K, N = [int(x) for x in input().split(" ")]\na = [int(x) for x in input(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s136018960', 's955969382', 's860642617'] | [26444.0, 26444.0, 26444.0] | [121.0, 224.0, 179.0] | [232, 274, 339] |
p02725 | u797375364 | 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\nlst = []\nfor i in range(0, len(a)-1) :\n lst += [a[i + 1] - a[i]]\nlst += [k - a[-1] + a[0]]\nprint(lst)\n\nprint(sum(lst) - max(lst))\n', 'k, n = map(int, input().split())\na = list(map(int, input().split()))\n\nlst = []\nfor i in range(0, ... | ['Wrong Answer', 'Accepted'] | ['s182725294', 's204506708'] | [26444.0, 26444.0] | [153.0, 142.0] | [203, 192] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.