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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03220 | u045408189 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nx=100000\nans=0\nfor i in h:\n if abs(t-i*0.006-a)<x:\n ans=h.index(i)\nprint(ans+1)\n', 'n=int(input())\nt,a=map(int,input().split())\nh=map(int,input().split())\nx=100000\nans=0\nfor i in h:\n if abs(t-i*0.006-a)<x:\n ans=index(i)\nprint(ans)\n', 'n=int(input())\nt,a=map(int,input().split())\nh=map(int,input().split())\nx=100000\nans=0\ny=0\nfor i in h:\n y=y+1\n if abs(t-i*0.006-a)<x:\n ans=y\nprint(ans)\n', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nmin = 1000\nfor i in range(n):\n T = t - h[i] * 0.006\n if abs(T-a) < min:\n min = abs(T-a)\n ans = i + 1\nprint(ans)\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s053017661', 's686269945', 's807818938', 's583344965'] | [3060.0, 3060.0, 3060.0, 3060.0] | [25.0, 18.0, 19.0, 18.0] | [161, 151, 156, 203] |
p03220 | u045953894 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\ndlist = []\n\nfor i in range(n):\n d = t - h[i] * 0.006 - a\n \n if d >= 0:\n dlist.append(d)\n else:\n d = -d\n dlist.append(d)\n \n \nm = 0\nfor j in range(n):\n if dlist[j-1] <= dlist[j]:\n m = dlist[i-1]\n print('1')\n else:\n m = dlist[j]\n print('2')\nprint(dlist.index(m) + 1)\n ", 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\ndlist = []\n\nfor i in range(n):\n d = t - h[i] * 0.006 - a\n \n if d >= 0:\n dlist.append(d)\n else:\n d = -d\n dlist.append(d)\n \nm = dlist[0]\n \nfor i in range(1,n):\n if dlist[i-1] <= dlist[i]:\n if dlist[i-1] <= m:\n m = dlist[i-1]\n else:\n pass\n else:\n if dlist[i] <= m:\n \tm = dlist[i]\n else:\n pass\n\n \nprint(dlist.index(m) + 1)\n '] | ['Wrong Answer', 'Accepted'] | ['s764732625', 's882841801'] | [3188.0, 3064.0] | [19.0, 18.0] | [432, 528] |
p03220 | u052347048 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input());t,a=map(int,input().split())\nlis=list(map(int,input().split()));li,l=abs((t-lis[0]*0.006)-a),0\nfor i in range(1,n):if abs((t-lis[i]*0.006)-a) < li:li,l=abs((t-lis[i]*0.006)-a),i\nprint(l+1)', 'n=int(input())\nt,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli=abs((t-lis[0]*0.006)-a)\nl=0\nfor i in range(1,n):\n b=abs((t-lis[i]*0.006)-a)\n if b<li:\n li=b\n l=i\nprint(l+1)'] | ['Runtime Error', 'Accepted'] | ['s998960973', 's183915596'] | [2940.0, 3064.0] | [17.0, 19.0] | [203, 209] |
p03220 | u057964173 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n n=int(input())\n t,a=map(int, input().split())\n h=list(map(int,input().split()))\n ans=n+1\n minabs=10**18\n for i in range(n):\n tempabs=abs(a-(t-h[i]*0.006))\n if tempabs<minabs:\n minabs=tempabs\n ans=i+1\n print(ans)\n', 'import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n n=int(input())\n t,a=map(int, input().split())\n h=list(map(int,input().split()))\n tempabs=[abs(a-(t-i*0.006)) for i in h]\n minabs=min(tempabs)\n print(tempabs.index(minabs)+1)\nresolve()'] | ['Wrong Answer', 'Accepted'] | ['s223985600', 's818671588'] | [3064.0, 3060.0] | [17.0, 18.0] | [356, 278] |
p03220 | u057993957 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = list(map(int, input().split()))\nh = list(map(int, input().split()))\nh = [abs(a - (t - i*.006)) for i in h]\n\nmins = h[0]\nindex = 0\nfor i in range(1, n):\n if h[i] < mins:\n mins = h[i]\n index = i\n \nprint((i+1))', 'n = int(input())\nt, a = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\nh = [ abs(a - (t - i*.006)) for i in h]\n\nmins = h[0]\nindex = 0\nprint(h)\nfor i in range(1, n):\n if h[i] < mins:\n mins = h[i]\n index = i\n \nprint((index+1))', 'n = int(input())\nt, a = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\nh = [ abs(a - (t - i*.006)) for i in h]\n\nmins = h[0]\nindex = 0\nfor i in range(1, n):\n if h[i] < mins:\n mins = h[i]\n index = i\n \nprint((index+1))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s143210601', 's408614502', 's642396944'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 19.0] | [241, 257, 248] |
p03220 | u063550903 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\nT,A=map(int,input().split())\nH=[int(i) for i in input().split()]\nans=0\nque=T-H[0]\nfor i in range(1,N):\n temp=T-0.006*H[i]\n if abs(A-que)>abs(A-temp):\n que=temp\n ans=i\nprint(ans+1)', 'N=int(input())\nT,A=map(int,input().split())\nH=[int(i) for i in input().split()]\nans=0\nque=T-0.006*H[0]\nfor i in range(1,N):\n temp=T-0.006*H[i]\n if abs(A-que)>abs(A-temp):\n que=temp\n ans=i\nprint(ans+1)'] | ['Wrong Answer', 'Accepted'] | ['s914641401', 's026419252'] | [3064.0, 3064.0] | [18.0, 18.0] | [214, 220] |
p03220 | u064246852 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int,input().split())\nH = list(map(int,input().split()))\nsa = [abs(T-0.006*H[i] - A) for i in range(N)]\nprint(sa.index(min(sa))+1)N = int(input())\nT, A = map(int,input().split())\nH = list(map(int,input().split()))\nsa = [abs(T-0.006*H[i] - A) for i in range(N)]\nprint(sa.index(min(sa))+1)', 'N = int(input())\nT, A = map(int,input().split())\nH = list(map(int,input().split()))\nsa = [abs(T-0.006*H[i] - A) for i in range(N)]\nprint(sa.index(min(sa))+1)'] | ['Runtime Error', 'Accepted'] | ['s420837355', 's782750463'] | [2940.0, 3060.0] | [17.0, 18.0] | [314, 157] |
p03220 | u065137691 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nprint(H)\n\nfor i in range(N):\n H[i] = T - (H[i] * 0.006)\nprint(H)\n\nfor k in range(N):\n H[k] = abs(H[k] - abs(A))\nprint(H)\n\nprint(H.index(min(H))+1)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\n\n\nfor i in range(N):\n H[i] = T - (abs(H[i]) * 0.006)\n\n\nfor k in range(N):\n H[k] = abs(H[k] - (A))\n\n\nprint((H.index(min(H)))+1)'] | ['Wrong Answer', 'Accepted'] | ['s585525615', 's816783910'] | [3188.0, 3060.0] | [20.0, 18.0] | [406, 386] |
p03220 | u065446124 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().suplit())\nh=list(input().suplit())\nb=1\nc=abs(t-h[0]*0.006-a)\nfor i in n :\n if(abs(t-h[i]*0.006-a)<c):\n b=i+1\n c=abs(t-h[i]*0.006-a)\n else:\n continue\nprint(b) ', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nb=1\nc=abs(t-h[0]*0.006-a)\nfor i in range(n) :\n if(abs(t-h[i]*0.006-a)<c):\n b=i+1\n c=abs(t-h[i]*0.006-a)\n else:\n continue\nprint(b)\n'] | ['Runtime Error', 'Accepted'] | ['s003281269', 's308076107'] | [3064.0, 3060.0] | [17.0, 18.0] | [205, 218] |
p03220 | u071201490 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["N = int(input())\nl = input().split(' ')\nH = input().split( )\n\nT=int(l[0])\nA = int(l[1])\nH = [int(x) for x in H]\n\ntem_gap = [abs((T-h*0.006)-A) for h in H]\nprint(tem_gap)\n\nmin = min(tem_gap)\nprint(tem_gap.index(min) + 1)", "N = int(input())\nl = input().split(' ')\nH = input().split( )\n\nT=int(l[0])\nA = int(l[1])\nH = [int(x) for x in H]\n\ntem_gap = [abs((T-h*0.006)-A) for h in H]\n\nmin = min(tem_gap)\nprint(tem_gap.index(min) + 1)"] | ['Wrong Answer', 'Accepted'] | ['s342674544', 's773037618'] | [3188.0, 3064.0] | [19.0, 19.0] | [219, 204] |
p03220 | u079543046 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nT, A = map(int, input().split())\nH = [int(i) for i in input().split()]\na = []\nans = 0\nsaitekionndo = 1000000000000\nfor i in range(n):\n a.append([abs((T-H[i]*0.006)-A)])\n if abs((T-H[i]*0.006)-A)<saitekionndo:\n ans = i+1\nprint(ans)', 'n = int(input())\nT, A = map(int, input().split())\nH = [int(i) for i in input().split()]\na = []\nans = 0\nsaitekionndo = 1000000000000\nfor i in range(n):\n a.append([abs((T-H[i]*0.006)-A)])\n if abs((T-H[i]*0.006)-A)<saitekionndo:\n saitekionndo = abs((T-H[i]*0.006)-A)\n ans = i+1\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s246271464', 's065465498'] | [3060.0, 3188.0] | [19.0, 19.0] | [260, 306] |
p03220 | u083960235 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['#my_answer\nN=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))#N times\n#print(H)\n#temp=T-x*0.006\ntemp=[0]*N\ngap=[0]*N\n\nfor i in range(N):\n\ttemp[i]=T-0.006*H[i]\n\tgap[i]=abs(temp[i]-A)\n\nprint(temp)\nfor i in range(N):\n\tif(gap[i]==min(gap)):\n\t\tprint(i+1)\n\n\n\n', '#my_answer\nN=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))#N times\nprint(H)\n#temp=0.006*(T-x)\ntemp=[0]*N\ngap=[0]*N\n\nfor i in range(N):\n\ttemp[i]=0.006*(T-H[i])\n\tgap[i]=abs(temp[i]-A)\n\nfor i in range(N):\n\tif(gap[i]==min(gap)):\n\t\tprint(i+1)\n\n\n\n', '#my_answer\nN=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))#N times\n#print(H)\n#temp=T-x*0.006\ntemp=[0]*N\ngap=[0]*N\n\nfor i in range(N):\n\ttemp[i]=T-0.006*H[i]\n\tgap[i]=abs(temp[i]-A)\n\n#print(temp)\nfor i in range(N):\n\tif(gap[i]==min(gap)):\n\t\tprint(i+1)\n\n\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s441856912', 's811593464', 's934256049'] | [3064.0, 3064.0, 3060.0] | [42.0, 43.0, 41.0] | [279, 270, 280] |
p03220 | u085334230 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = list(map(int, input().split()))\nH = list(map(int, input().split()))\nlist = []\nfor i in H:\n list.append(T - i * 0.006)\nfor i in range(len(list)):\n list[i] = A - list[i]\nprint(list)\nprint(list.index((min(list))) + 1)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nfor i in range(N):\n temp = T - H[i] * 0.006\n H[i] = abs(A - temp)\n\nprint(H.index(min(H)) + 1)\n'] | ['Wrong Answer', 'Accepted'] | ['s818704865', 's551432440'] | [3060.0, 3060.0] | [19.0, 18.0] | [245, 187] |
p03220 | u085530099 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nx = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\nt = x[0]\na = x[1]\ncnt = 1000000000000000000000\nans = 0\nfor i in range(n):\n tmp = a - t-h[i]*0.006\n if cnt > tmp:\n cnt = tmp\n ans = i+1\nprint(ans)\n', 'n = int(input())\nx = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\nt = x[0]\na = x[1]\ncnt = 1000000000000000000000\nans = 0\nfor i in range(n):\n tmp = abs(t-(h[i]*0.006)-a)\n if cnt > tmp:\n cnt = tmp\n ans = i+1\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s107848352', 's498957014'] | [9108.0, 9200.0] | [28.0, 31.0] | [244, 249] |
p03220 | u092244748 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\narray = list(map(int, input().split()))\n\nsa = 10000\nfor i in range(n):\n print(abs(a - (t - array[i] * 0.006)))\n if sa > abs(a - (t - array[i] * 0.006)):\n sa = (a - (t - array[i] * 0.006))\n ans = i + 1\n\nprint(ans)', 'n = int(input())\nt, a = map(int, input().split())\narray = list(map(int, input().split()))\n\nsa = 60\nfor i in range(n):\n if sa > a - (t - array[i] * 0.006):\n sa = a - (t - array[i] * 0.006)\n ans = i\n\nprint(ans)', 'n = int(input())\nt, a = map(int, input().split())\narray = list(map(int, input().split()))\n\nsa = 10000\nfor i in range(n):\n if sa > abs(a - (t - array[i] * 0.006)):\n sa = abs((a - (t - array[i] * 0.006)))\n ans = i + 1\n\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s631311323', 's996414685', 's707470425'] | [3188.0, 3060.0, 3060.0] | [20.0, 18.0, 18.0] | [282, 225, 244] |
p03220 | u093033848 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = [int(input()) for i in range(N)]\nprint(H.index(min(abs(int(T - H[i] * 0.006) - A)) for i in range(N)))', 'n = int(input())\nt, a = map(int, input().split())\ne = [int(i) for i in input().split()]\n\ntemp = []\nfor i in e:\n temp.append(abs(t - i * 0.006 - a))\n \nprint(e)\nprint(temp)\nprint(temp.index(min(temp)) + 1)\n\n\n', 'N = int(input())\nT, A = map(int, input().split())\nH = [int(input()) for i in range(N)]\nprint(H.index(min(abs(int(T - H[i] * 0.006 - A)) for i in range(N))))', 'N = int(input())\nT, A = map(int, input().split())\ndiff =50000000\nnum = 0\nfor i in range(N):\n H = int(input())\n if abs(T - H*0.006 - A) < diff:\n num = i + 1', 'N = int(input())\nT, A = map(int, input().split())\ndiff =50000000\nnum = 0\nfor i in range(1,N+1):\n H = int(input())\n if abs(T - H*0.006 - A) < diff:\n num = i', 'n = int(input())\nt, a = map(int, input().split())\ne = [int(i) for i in input().split()]\n\ntemp = []\nfor i in e:\n temp.append(abs(t - i * 0.006 - a))\n \nprint(temp.index(min(temp)) + 1)\n\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s289163025', 's406012831', 's574796504', 's634913038', 's719591112', 's403134848'] | [3060.0, 3188.0, 3060.0, 3060.0, 3060.0, 3060.0] | [19.0, 19.0, 18.0, 18.0, 18.0, 18.0] | [156, 212, 156, 168, 168, 190] |
p03220 | u100800700 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['import numpy as np\nN = int(input())\nT,A = map(int, input().split())\nH = np.array(list(map(int, input().split())))\nH = T - 0.006*H - A\nH = np.abs(H)\nprint(np.argmin(H))', 'import numpy as np\nN = int(input())\nT,A = map(int, input().split())\nH = np.array(list(map(int, input().split())))\nmeanx = (T - A)/0.006\nH = H - meanx\nH = np.abs(H)\nprint(np.argmin(H))', '#Palace\nN,T,A,*H = map(int,open(0).read().split())\nA = [A]*N\nfor i in range (N):\n H[i] = abs((T-H[i]*0.006)-A[i])\nprint(H.index(min(H)+1)+1)\n', 'N = int(input())\nT,A = map(int, input().split())\nH = list(map(int, input().split()))\nmeanx = (T - A)/0.006\nH = H - meanx\nprint(index(min(H)))', '#Palace\nN,T,A,*H = map(int,open(0).read().split())\nA = [A]*N\nfor i in range (N):\n H[i] = abs((T-H[i]*0.006)-A[i])\nprint(H.index(min(H)+1)+1)', '#Palace\nN,T,A,*H = map(int,open(0).read().split())\nA = [A]*N\nfor i in range (N):\n H[i] = abs((T-H[i]*0.006)-A[i])\nprint(H.index(min(H)+1)+1)', 'import numpy as np\nN = int(input())\nT,A = map(int, input().split())\nH = np.array(list(map(int, input().split())))\nH = T - 0.006*H - A\nH = np.abs(H)\nprint(np.argmin(H) + 1)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s007907242', 's028721791', 's274896375', 's760329854', 's826011674', 's976289104', 's990875584'] | [12396.0, 12488.0, 3188.0, 3060.0, 3060.0, 3060.0, 12396.0] | [148.0, 149.0, 18.0, 18.0, 18.0, 18.0, 149.0] | [167, 183, 144, 141, 143, 143, 171] |
p03220 | u103341055 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nH = [int(n) for n in input().split()]\n\nmin_t = T\nmin_i = 0\n\nfor i in range(N):\n t = abs(A - (T - H[i]*0.006))\n if t <= min_t:\n min_t = t\n min_i = i\n\n\nprint(min_i)\n', 'N = int(input())\nT,A = map(int,input().split())\nH = [int(n) for n in input().split()]\n\nmin_t = 10**5\nmin_i = 0\n\nfor i in range(N):\n t = abs(A - (T - H[i]*0.006))\n if t <= min_t:\n min_t = t\n min_i = i\n\n\nprint(min_i+1)'] | ['Wrong Answer', 'Accepted'] | ['s040908925', 's942383761'] | [9148.0, 9264.0] | [26.0, 27.0] | [231, 236] |
p03220 | u103902792 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\nans = float('inf')\nfor h in H:\n if abs(t-ans*0.006) > abs(t-ans*0.006):\n ans = h\nprint(H.index(ans)+1)", "n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\nans = float('inf')\nfor h in H:\n if abs(a-(t-ans*0.006)) > abs(a-(t-h*0.006)):\n ans = h\nprint(H.index(ans)+1)"] | ['Runtime Error', 'Accepted'] | ['s270155559', 's595597042'] | [3060.0, 3060.0] | [18.0, 18.0] | [189, 195] |
p03220 | u104003430 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\n\nmin = 99999\nans = 99999\n\nfor i in range(n):\n tmp = t - hs[i] * 0.006\n d = abs(a-tmp)\n print(d < min , d, min)\n if d < min:\n ans = i\n min = d\n\nprint(ans+1)', 'n = int(input())\nt, a = map(int, input().split(" "))\n\n\nnums = map(int, input().split(" "))\n\nxxx = map(lambda x: abs(a-t-0.006*x), nums)\n\nm = min(xxx)\n\nfor i, v in xxx.enumerate:\n if m == v:\n print(i)\n', 'n = int(input())\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\n\n\n\nmin = 99999\nans = 99999\n\nfor i in range(n):\n tmp = t - hs[i] * 0.006\n if abs(a-tmp) < min:\n ans = i\n\nprint(i+1)\n', 'n = int(input())\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\n\n\n\nmin = 99999\nans = 99999\n\nfor i in range(n):\n tmp = t - hs[i] * 0.006\n if abs(a-tmp) < min:\n ans = i\n min = abs(a-tmp)\n\nprint(i+1)\n', 'n = int(input())\nt, a = map(int, input().split())\nplaces = map(int, [input() for _ in range(n)]\n\nk = places.map(lambda x: abs(a - t - (H * 0.006)) // が最小となるindex\n \n\ntarget = enumerate(k) \nans = (0, 99999)\n\nfor i in target:\n if i[1] < ans[1]:\n ans = i\n\nprint(i[0])', 'n = int(input())\nt, a = map(int, input().split(" "))\n\n\nnums = map(int, input().split(" "))\n\nxxx = map(lambda x: abs(a-t-0.006*x), nums)\n\nm = min(xxx)\n\nfor i, v in xxx.enumerete:\n if m == v:\n print(i)\n', 'n = int(input())\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\n\n\n\nmin = 99999\nans = 99999\n\nfor i in range(n):\n tmp = t - hs[i] * 0.006\n if abs(a-tmp) < min:\n ans = i\n min = abs(a-tmp)\n', 'n = int(input())\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\n\nmin = 99999\nans = 99999\n\nfor i in range(n):\n tmp = t - hs[i] * 0.006\n d = abs(a-tmp)\n if d < min:\n ans = i\n min = d\n\nprint(ans+1)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s357303949', 's363451932', 's440837715', 's642388188', 's713295818', 's733316894', 's967652319', 's196685077'] | [3428.0, 3060.0, 3060.0, 3188.0, 2940.0, 3060.0, 3060.0, 3064.0] | [22.0, 17.0, 18.0, 18.0, 19.0, 18.0, 18.0, 20.0] | [268, 210, 215, 240, 295, 210, 228, 240] |
p03220 | u106778233 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int,input().split())\nbeta = 0.006\nH = list(map(int,input().split()))\nimport numpy as np \nH = np.array(H) \nuse = t - beta * H - a \nuse = use**2 \npre_answer = min(use) \nans = 1 + use.index(pre_answer) \nprint(ans)', 'n = int(input())\nt, a = map(int,input().split())\nbeta = 0.006\nH = list(map(int,input().split()))\nimport numpy as np \nH = np.array(H) \nuse = t - beta * H - a \nuse = use**2 \npre_answer = min(use)\nuse = list(use) \nans = 1 + use.index(pre_answer) \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s548673892', 's491624050'] | [27076.0, 30772.0] | [114.0, 285.0] | [238, 254] |
p03220 | u107091170 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\nT,A=map(int, input().split())\nH=list(map(int, input().split()))\ntmin = 10000000\nfor i in range(N):\n if tmin < (T - H[i] * 0.006):\n ans = i+1\n tmin = T - H[i] * 0.006\nprint(ans)\n ', 'N=int(input())\nT,A=map(int, input().split())\nH=list(map(int, input().split()))\ntmin = 10000000\nfor i in range(N):\n if tmin < (T - H[i] * 0.006):\n ans = i\n tmin = T - H[i] * 0.006\nprint(i+1)\n ', 'N=int(input())\nT,A=map(int, input().split())\nH=list(map(int, input().split()))\ntmin = 10000000\nfor i in range(N):\n if tmin < abs(T - H[i] * 0.006):\n ans = i+1\n tmin = abs(T - H[i] * 0.006)\nprint(ans)\n ', 'N=int(input())\nT,A=map(int, input().split())\nH=list(map(int, input().split()))\ntmin = 10000000\nfor i in range(N):\n if tmin > abs(A - (T - H[i] * 0.006)):\n ans = i+1\n tmin = abs(A - (T - H[i] * 0.006))\nprint(ans)\n\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s181094593', 's738505505', 's791424981', 's789862441'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0, 18.0] | [203, 201, 211, 220] |
p03220 | u108990937 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["n = int(input())\nt,a = (int(i) for i in input().split(' '))\nh = [abs((t - int(i) * 0.0006) - a) for i in input().split(' ')]\nprint(h.index(min(h))+1)", "n = int(input())\nt,a = (int(i) for i in input().split(' '))\nh = [abs((t - int(i) * 0.006) - a) for i in input().split(' ')]\nprint(h.index(min(h))+1)"] | ['Wrong Answer', 'Accepted'] | ['s526063337', 's894864766'] | [3060.0, 3060.0] | [18.0, 17.0] | [149, 148] |
p03220 | u111652094 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nB = abs(A-(T-0.006*H[0]))\nfor i in range(N):\n C = abs(A-(T-0.006*H[i]))\n if B>C:\n B = C\n ans = i+1\nprint(ans)\n', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nB = abs(A-(T-0.006*H[0]))\nfor i in range(N):\n C = abs(A-(T-0.006*H[i]))\n if B>=C:\n B = C\n ans = i+1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s755323413', 's857323942'] | [3060.0, 3060.0] | [19.0, 19.0] | [213, 214] |
p03220 | u112567325 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = list(map(int,input().split()))\nH = list(map(int,input().split()))\n\ntmp = 10000000\nfor i in range(N):\n if tmp >= abs(T - (H[i] * 0.006)):\n tmp = abs(T - (H[i] * 0.006))\n ans = i + 1\nprint(ans)', 'N = int(input())\nT,A = list(map(int,input().split()))\nH = list(map(int,input().split()))\n\ntmp = 10000000\nfor i in range(N):\n if tmp >= abs(A - (T - (H[i] * 0.006))):\n tmp = abs(A - (T - (H[i] * 0.006)))\n ans = i + 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s126562941', 's066710655'] | [3188.0, 3060.0] | [18.0, 18.0] | [221, 233] |
p03220 | u112623731 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = list(map(int,input().split())) \nH = list(map(int,input().split()))\n\ntmp = 10**10\nindex = 1\n\nfor i in range(N):\n if tmp > abs(A - (T - H[i] * 0.006)):\n index += 1\n tmp = abs(A - (T - H[i] * 0.006))\nprint(index)', 'N = int(input())\nT, A = list(map(int,input().split())) \nH = list(map(int,input().split()))\n\nl = []\n\nfor i in range(N):\n l.append(abs(A - (T - H[i] * 0.006)))\nprint(l.index(min(l))+1)'] | ['Wrong Answer', 'Accepted'] | ['s896798418', 's865543448'] | [3064.0, 3060.0] | [18.0, 18.0] | [360, 185] |
p03220 | u113255362 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A=map(int,input().split())\nList = list(map(int, input().split()))\nt = 0\nmid = 0\nMID = 100000000000\nres = 100000000000\nfor i in range(N):\n t = T - 0.006*List[i]\n mid = abs(A-t)\n if mid < MID:\n MID = mid\n res = i+1\nprint(i+1)', 'N = int(input())\nT,A=map(int,input().split())\nList = list(map(int, input().split()))\nt = 0\nmid = 0\nMID = 100000000000\nres = 100000000000\nfor i in range(N):\n t = T - 0.006*List[i]\n mid = abs(A-t)\n if mid < MID:\n MID = mid\n res = i+1\nprint(res)'] | ['Wrong Answer', 'Accepted'] | ['s030641396', 's324418158'] | [9280.0, 9104.0] | [26.0, 26.0] | [251, 251] |
p03220 | u113971909 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\nT,A=map(int,input().split())\nH = list(map(int,input().split()))\nHans = (T-A)/6*1000\nind = -1\ndis = 10**5\nfor i in range(len(H)):\n if dis > abs(Hans - H[i]):\n dis = abs(Hans - H[i])\n ind = i\nprint(i+1)', 'N=int(input())\nT,A=map(int,input().split())\nH = list(map(int,input().split()))\nind = -1\ndis = 10**5\nfor i in range(len(H)):\n dx = abs(A - (T-H[i]*0.006))\n if dis > dx:\n dis = dx\n ind = i\nprint(i+1)', 'N=int(input())\nT,A=map(int,input().split())\nH = list(map(int,input().split()))\nind = -1\ndis = 10**5\nfor i in range(len(H)):\n dx = abs(A - (T-H[i]*0.006))\n if dis > dx:\n dis = dx\n ind = i\nprint(ind+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s034332023', 's580283939', 's631720632'] | [3060.0, 3060.0, 3064.0] | [17.0, 18.0, 18.0] | [222, 205, 207] |
p03220 | u118642796 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\n\ntmp = 1000\nans = 0\nfor i in range(len(H)):\n tmp_ = abs(A-(T-H[i]*0.006))\n print(tmp,tmp_)\n if tmp_<tmp:\n ans = i\n tmp = tmp_\nprint(ans+1)\n', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\n\ntmp = 1000\nans = 0\nfor i in range(len(H)):\n tmp_ = abs(A-(T-H[i]*0.006))\n if tmp_<tmp:\n ans = i\n tmp = tmp_\nprint(ans+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s652652224', 's268135836'] | [3316.0, 3060.0] | [21.0, 18.0] | [245, 225] |
p03220 | u124070765 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\ndiff=1000000\nans=-1\nfor i in range(n):\n ave=t-(h[i]*0.006)\n tmp=a-ave\n if tmp < 0:\n tmp*=-1\n if diff > tmp:\n diff=tmp\n ans=i+1\nprint(ans)p', "n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\ndiff=float('INF')\nans=-1\nfor i in range(n):\n ave=t-(h[i]*0.006)\n tmp=a-ave\n if tmp < 0:\n tmp*=-1\n if diff > tmp:\n diff=tmp\n ans=i+1\nprint(ans)p", 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\ndiff=1000000\nfor i in range(n):\n ave=t-(h[i]*0.006)\n tmp=a-ave\n if tmp < 0:\n tmp*=-1\n if diff > tmp:\n diff=tmp\n ans=i+1\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s706274521', 's971219923', 's315676522'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [248, 253, 240] |
p03220 | u127499732 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n,t,a=int(input()),map(int,input().split())\nh=list(map(int,input().split()))\nprint(min(h).index()+1)', 'n=int(input()),\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nx=[abs(a-t+0.006*i) for i in h]\nprint(x.index(min(x))+1)'] | ['Runtime Error', 'Accepted'] | ['s638029458', 's111715193'] | [2940.0, 3060.0] | [17.0, 18.0] | [100, 134] |
p03220 | u129978636 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A map( int, input().split())\nH = list( map( int, input.split()))\n \nK = []\nKsorted=[]\ntmp=[]\n\nfor i in range(N):\n tmp.append( T - H[i] * 0.006)\n K.append(abs( A - tmp[i]))\n Ksorted = sorted(K)\n \nT = K.index(Ksorted[0])\nprint(T + 1)', 'N = int(input())\nT, A = map( int, input().split())\nH = list( map( int, input.split()))\n \nK = []\nKsorted=[]\ntmp=[]\n \nfor i in range(N):\n tmp.append( T - H[i] * 0.006)\n K.append(abs( A - tmp[i]))\n Ksorted = sorted(K)\n \nT = K.index(Ksorted[0])\nprint(T+1)\n', 'N = int(input())\nT, A = map( int, input().split())\nH = list( map( int, input().split()))\n \nK = []\nKsorted=[]\ntmp=[]\n \nfor i in range(N):\n tmp.append( T - H[i] * 0.006)\n K.append(abs( A - tmp[i]))\n Ksorted = sorted(K)\n \nT = K.index(Ksorted[0])\nprint(T+1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s401200232', 's522239181', 's727595727'] | [2940.0, 3060.0, 3064.0] | [17.0, 17.0, 114.0] | [263, 264, 265] |
p03220 | u131625544 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\ntmp = 1000\nfor i, h in enumerate(H):\n k = abs(A - (T - h * 0.006))\n if k < tmp:\n tmp = k\n ans = i\n\nprint(i + 1)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\ntmp = 1000\nfor i, h in enumerate(H):\n k = abs(A - (T - h * 0.006))\n if k < tmp:\n tmp = k\n ans = i\n\nprint(ans + 1)'] | ['Wrong Answer', 'Accepted'] | ['s685516964', 's858276700'] | [3060.0, 3060.0] | [18.0, 18.0] | [226, 228] |
p03220 | u136395536 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = (int(i) for i in input().split())\nH = [int(i) for i in input().split()]\n\nplace = 1\nclosest = abs(T - H[0]*0.006)\n\nfor i in range(1,N):\n if abs(T-H[i]*0.006) < closest:\n place = i + 1\n\nprint(place)', 'N = int(input())\nT,A = (int(i) for i in input().split())\nH = [int(i) for i in input().split()]\n\nplace = 1\nclosest = abs(T - H[0]*0.006)\n\nfor i in range(1,N):\n temperature = abs(T-H[i]*0.006)\n if temperature < closest:\n place = i + 1\n closest = temperature\n\nprint(place)', 'N = int(input())\nT,A = (int(i) for i in input().split())\nH = [int(i) for i in input().split()]\n\nplace = 1\nclosest = abs(A - (T - H[0]*0.006))\n\nfor i in range(1,N):\n temperature = abs(A - (T - H[i]*0.006))\n if temperature < closest:\n place = i + 1\n closest = temperature\n\nprint(place)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s333438077', 's489484527', 's527319167'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [229, 289, 303] |
p03220 | u137443009 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["N = int(input())\nlist = input().split()\nT = list[0]\nA = list[1]\nprint('Tは{}'.format(T))\nprint('Aは{}'.format(A))\nlist2 = input().split()\nH = []\nT_mean = []\nminimum = []\nfor i in range(N):\n H.append(list2[i])\n T_mean.append(int(T)-int(H[i])*0.006)\n minimum.append(abs(T_mean[i] - int(A)))\n\n\nprint(minimum.index(min(minimum))+1)", 'N = int(input())\nlist = input().split()\nT = list[0]\nA = list[1]\nlist2 = input().split()\nH = []\nT_mean = []\nminimum = []\nfor i in range(N):\n H.append(list2[i])\n T_mean.append(int(T)-int(H[i])*0.006)\n minimum.append(abs(T_mean[i] - int(A)))\n\n\nprint(minimum.index(min(minimum))+1)'] | ['Wrong Answer', 'Accepted'] | ['s942977504', 's271904952'] | [3064.0, 3064.0] | [19.0, 19.0] | [338, 286] |
p03220 | u138385857 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = (int(i) for i in input().split())\nH = [int(i) for i in input().split()]\n\nH_T = [0 for i in range(len(H))]\nfor i in range(len(H)):\n H_T[i] = float(T) - float(H[i])*0.006\n\nmin = 50\nindex = 0\nfor i in range(len(H_T)):\n if(abs(H_T[i] - A) < min):\n index = i\n min = abs(H_T[i] - A)\nprint(H_T)\nprint(index+1)\n', 'N = int(input())\nT, A = (int(i) for i in input().split())\nH = [int(i) for i in input().split()]\n\nH_T = [0 for i in range(len(H))]\nfor i in range(len(H)):\n H_T[i] = float(T) - float(H[i])*0.006\n\nmin = 1000\nindex = 0\nfor i in range(len(H_T)):\n if(abs(H_T[i] - A) < min):\n index = i\n min = abs(H_T[i] - A)\nprint(index+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s202079080', 's276463816'] | [3064.0, 3064.0] | [19.0, 18.0] | [347, 338] |
p03220 | u140724346 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\ns = [abs(A - (T - 0.006 * x)) for x in map(int, input().split())]\nprint(s.index(min(s) + 1))', 'N = int(input())\nT, A = map(int, input().split())\ns = [abs(A - (T - 0.006 * x)) for x in map(int, input().split())]\nprint(s.index(min(s))+1)'] | ['Runtime Error', 'Accepted'] | ['s297304389', 's972155346'] | [3060.0, 3060.0] | [18.0, 18.0] | [142, 140] |
p03220 | u142903114 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nans_num = 1\nans_para = h[0]\nfor i, r in enumerate(h):\n deg = t - (r * 0.006)\n ans_para_deg = t - (ans_para * 0.006)\n if abs(a - ans_para_deg) >= abs(a - deg):\n ans_para = r\n ans_num = i+1\nprint(ans_num', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nans_num = 1\nans_para = h[0]\nfor i, r in enumerate(h):\n deg = t - (r * 0.006)\n ans_para_deg = t - (ans_para * 0.006)\n if abs(a - ans_para_deg) >= abs(a - deg):\n ans_para = r\n ans_num = i+1\nprint(ans_num)'] | ['Runtime Error', 'Accepted'] | ['s810364234', 's751958526'] | [3060.0, 3060.0] | [17.0, 18.0] | [311, 312] |
p03220 | u144542168 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['\ndef datain(num):\n\n data = []\n iscnt = True\n\n while iscnt:\n for val in map(int,input().split()):\n data.append(val)\n if len(data) == num:\n iscnt = False\n break\n \n return data\n\ndata = datain(int(input())+2)\n\nans = 0\ntemp = [abs(data[1]-(data[0]-0.006*temp)) for temp in data[2:]]\nprint(temp)\n\nfor i,val in enumerate(temp):\n if temp[ans] > val:\n ans = i\n\nprint(ans+1)', '\ndef datain(num):\n\n data = []\n iscnt = True\n\n while iscnt:\n for val in map(int,input().split()):\n data.append(val)\n if len(data) == num:\n iscnt = False\n break\n \n return data\n\ndata = datain(int(input())+2)\n\nminval = 1000000\nans = 0\ntemp = [abs(data[1]-(data[0]-0.006*temp)) for temp in data[2:]]\n#print(temp)\n\nfor i,val in enumerate(temp):\n if minval > val:\n minval = val\n ans = i\n\nprint(ans+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s017184250', 's702533646'] | [3064.0, 3064.0] | [19.0, 19.0] | [498, 535] |
p03220 | u144980750 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=[int(i) for i in input().split()]\nh=[t-int(i)*0.006 for i in input().split()]\nans=0\nfor i in range(n):\n if abs(A-h[i])<abs(A-h[ans]):\n ans=i\nprint(ans+1)', 'n=int(input())\nt,a=[int(i) for i in input().split()]\nh=[t-int(i)*0.006 for i in input().split()]\nans=0\nfor i in range(n):\n if abs(a-h[i])<abs(a-h[ans]):\n ans=i\nprint(ans+1)'] | ['Runtime Error', 'Accepted'] | ['s718454266', 's191869116'] | [3060.0, 3060.0] | [18.0, 18.0] | [176, 176] |
p03220 | u145600939 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = -1.0\nd = 1e100\nfor i,j in enumerate(h):\n if abs(t - j*0.006) < d:\n ans = i+1\nprint(ans)\n', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = -1.0\nd = 1e100\nfor i,j in enumerate(h):\n if abs(t - j*0.006) < d:\n ans = i+1\n d = abs(t - j*0.006)\nprint(ans)\n', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = -1.0\nd = 1e100\nfor i,j in enumerate(h):\n if abs(t - j*0.006 - a) < d:\n ans = i+1\n d = abs(t - j*0.006 - a)\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s616734957', 's619202605', 's753954530'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [181, 206, 214] |
p03220 | u152614052 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input()) \nt,a = map(int,input().split())\nx_li = list(map(int,input().split())) \n\nx_temp_li = []\nx_a_li = []\nfor i in x_li:\n temp = t - i * 0.006\n x_temp_li.append(temp)\n\nprint(x_temp_li)\n\nfor i in x_temp_li:\n temp_a = i - a\n x_a_li.append(abs(temp_a))\n print(abs(temp_a))\nprint(x_a_li.index(min(x_a_li)) + 1)', 'n = int(input()) \nt,a = map(int,input().split())\nx_li = list(map(int,input().split())) \n\nx_temp_li = []\nx_a_li = []\nfor i in x_li:\n temp = t - i * 0.006\n x_temp_li.append(temp)\nfor i in x_temp_li:\n temp_a = i - a\n x_a_li.append(abs(temp_a))\nprint(x_a_li.index(min(x_a_li)) + 1)'] | ['Wrong Answer', 'Accepted'] | ['s011930545', 's731628793'] | [3316.0, 3064.0] | [20.0, 18.0] | [370, 328] |
p03220 | u154191677 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nh_list = [int(i) for i in input().split()]\navg_tmp = []\nfor i in h_list:\n avg = int(t - i * 0.006)\n avg_tmp.append(avg)\nmin = abs(avg_tmp[0] - a)\nprint("min:", min)\nl = 0\nfor i in range(1, n):\n min_diff = abs(t - avg_tmp[i] - a)\n print(min_diff)\n if(min > min_diff):\n min = min_diff\n l = i\nprint(l+1)', 'n = int(input())\nt, a = map(int, input().split())\nlis = list(map(int, input().split()))\n\navg_tmp = abs(t - (lis[0] * 0.006) - a)\nc = 0\nfor i in range(1, n):\n min_diff = abs(t - (lis[i] * 0.006) - a)\n if(avg_tmp > min_diff):\n l = i\nprint(l+1)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\nL = []\n\nfor i in range(n):\n L.append(abs(a - (t - h[i] * 0.006)))\nprint(L.index(min(L)) + 1)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s653829169', 's863629583', 's280083885'] | [3316.0, 3064.0, 3060.0] | [19.0, 18.0, 17.0] | [379, 254, 181] |
p03220 | u156302018 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int,input().split())\nh = list(map(int,input().split()))\n\ncounter = 0\ndiff = abs(a - (t - h[0] * 0.006))\n\nfor x in h:\n average_temple = t - x * 0.006\n counter += 1\n if diff > abs(a - average_temple):\n poss = counter\n\nprint(poss)', 'n = int(input())\nt, a = map(int,input().split())\nh = list(map(int,input().split()))\n\natlist = []\nfor i in h:\n atlist.append(abs(a - (t - i * 0.006)))\n\nprint(atlist.index(min(atlist)) + 1)'] | ['Runtime Error', 'Accepted'] | ['s083755690', 's472478228'] | [9132.0, 9216.0] | [27.0, 27.0] | [271, 190] |
p03220 | u159335277 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\n\nt, a = list(map(int, input().split()))\n\nh = list(map(int, input().split()))\n\nh = list(map(lambda i, x: (t - x * 0.006, i), enumerate(h)))\n\nh.sort()\n\nprint(h[0][1] + 1)', 'n = int(input())\n\nt, a = list(map(int, input().split()))\n\nh = list(map(int, input().split()))\n\nh = list(map(lambda x: (abs(a - (t - x[1] * 0.006)), x[0]), enumerate(h)))\n\nh.sort()\n\nprint(h[0][1] + 1)\n'] | ['Runtime Error', 'Accepted'] | ['s343839836', 's104269903'] | [3060.0, 3188.0] | [18.0, 18.0] | [185, 200] |
p03220 | u160939083 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\n\nT, A = list(map(int , input().split()))\n\nH = list(map(int , input().split()))\n\nTlist =[]\n\nfor n in range(N):\n\tTlist.append(T - H[n]*0.006)\n\n\nt = Tlist[0]\nm = None\n\nfor n in range(N):\n\tif abs(t-A) > abs(Tlist[n]-A):\n\t\tt = Tlist[n]\n\t\tm = n\n\nM = m + 1\nprint(M)\n\n', 'N = int(input())\n\nT, A = list(map(int , input().split()))\n\nH = list(map(int , input().split()))\n\nTlist =[]\n\nfor n in range(N):\n\tTlist.append(T - H[n]*0.006)\n\nt = Tlist[0]\nm = 0\n\nfor n in range(N):\n\tif abs(t-A) > abs(Tlist[n]-A):\n\t\tt = Tlist[n]\n\t\tm = n\n\nM = m + 1\nprint(M)'] | ['Runtime Error', 'Accepted'] | ['s982318304', 's000268158'] | [3064.0, 3064.0] | [19.0, 19.0] | [277, 271] |
p03220 | u161201983 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(float,input().split())\n\nnum = 0\npre = 100000\nfor i in range(N):\n x = float(input())\n ave = T - x*0.006\n if abs(A-ave)<pre:\n pre = abs(A-ave)\n num = i\nprint(num)', 'N = int(input())\nT,A = map(float,input().split())\n\nnum = 0\npre = A\nfor i in range(N):\n x = float(input())\n ave = T - x*0.006\n if abs(A-ave)<pre:\n pre = abs(A-ave)\n num = i\nprint(i)', 'N = int(input())\nT,A = map(float,input().split())\n\nnum = 0\npre = A\nfor i in range(N):\n x = float(input())\n ave = T - x*0.006\n if abs(A-ave)<pre:\n pre = abs(A-ave)\n num = i\nprint(i)', 'N = int(input())\nT,A = map(int,input().split())\n\nnum = 0\npre = A\nfor i in range(N):\n x = input()\n ave = T - x*0.006\n if abs(A-ave)<pre:\n pre = abs(A-ave)\n num = i\nprint(i)', 'N = int(input())\nT,A = map(float,input().split())\n\nnum = 0\npre = A\nfor i in range(N):\n x = float(input())\n ave = T - x*0.006\n if abs(A-ave)<pre:\n pre = abs(A-ave)\n num = i\nprint(num)', 'N = int(input())\nT,A = map(float,input().split())\nH = list(map(int,input().split()))\n\ndis = []\nfor i in range(N):\n dis.append(abs(A-(T-H[i]*0.006)))\nprint(dis.index(min(dis))+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s009233997', 's039827815', 's196770525', 's209411180', 's506296830', 's946817060'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [210, 203, 203, 194, 205, 180] |
p03220 | u163534954 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\nT,A=list(map(lambda x:float(A),input().split()))\nH_list = list(map(lambda x:float(A),input().split()))\ndiff = [abs(T-x*0.006-A) for x in H_list]\ni=diff.index(min(diff))\nprint(i+1)', 'N=int(input())\nT,A=list(map(lambda x:float(x),input().split()))\nH_list = list(map(lambda x:float(x),input().split()))\ndiff = [abs(T-x*0.006-A) for x in H_list]\ni=diff.index(min(diff))\nprint(i+1)'] | ['Runtime Error', 'Accepted'] | ['s559125377', 's333193844'] | [3060.0, 3060.0] | [17.0, 17.0] | [194, 194] |
p03220 | u165268875 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [(T - i * 0.006) for i in H]\n\nif any(i <= 0 for i in list) :\n print(list.index(max(list)) + 1)\nelse :\n print(list.index(min(list)) + 1)\n\nprint(list)\n', '\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [A-(T - i * 0.006) for i in H]\n\nif any(i < 0 for i in list) :\n print(list.index(max(list)) + 1)\nelse :\n print(list.index(min(list)) + 1)\n', '\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [A-(T - i * 0.006) for i in H]\n\nprint(list.index(min(list)))\n', '\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [12-(T - i * 0.006) for i in H]\n\nprint(list.index(min(list)))\n', '\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [A-(T - i * 0.006) for i in H]\n\nprint(list.index(min(abs(list)))+1)\n', '\nN = int(input()) \nT, A = map(int, input().split()) \nH = list(map(int, input().split())) \n\nlist = [abs(A-(T - i * 0.006)) for i in H]\n\nprint(list.index(min(list))+1)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s067077246', 's240193940', 's481206848', 's744766956', 's844798846', 's108158513'] | [3060.0, 3060.0, 3060.0, 3060.0, 3064.0, 3060.0] | [18.0, 18.0, 20.0, 18.0, 25.0, 20.0] | [308, 296, 214, 215, 221, 221] |
p03220 | u166696759 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nH = list(map(int, input().split()))\nY = []\nfor i in range(n):\n tmp = t - H[i]*0.006\n Y.append(abs(tmp-a))\nminy = Y[0]\nfor item in Y:\n miny = min(miny, item)\nprint(Y)\nres = Y.index(miny)\nprint(res+1)\n\n ', 'n = int(input())\nt, a = map(int, input().split())\nH = list(map(int, input().split()))\nY = []\nfor i in range(n):\n tmp = t - H[i]*0.006\n Y.append(abs(tmp-a))\nminy = Y[0]\nfor item in Y:\n miny = min(miny, item)\nres = Y.index(miny)\nprint(res+1)\n\n '] | ['Wrong Answer', 'Accepted'] | ['s544631820', 's399736616'] | [3060.0, 3060.0] | [19.0, 18.0] | [263, 254] |
p03220 | u172035535 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nans = 10**10\nmean = 10**10\nfor i in range(len(H)):\n ans = i if A-(T-H[i]*0.006) < mean else ans\n mean = A-(T-H[i]*0.006) if A-(T-H[i]*0.006) < mean else mean\n print(i,A-(T-H[i]*0.006))\nprint(int(ans)+1)', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nans = 10**10\nmean = 10**10\nfor i in range(len(H)):\n ans = i if abs(A-(T-H[i]*0.006)) < mean else ans\n mean = abs(A-(T-H[i]*0.006)) if abs(A-(T-H[i]*0.006)) < mean else mean\nprint(int(ans)+1)'] | ['Wrong Answer', 'Accepted'] | ['s578214391', 's364368415'] | [3316.0, 3064.0] | [20.0, 18.0] | [294, 279] |
p03220 | u178432859 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\nind , temp = 0, float("inf")\nfor i in range(n):\n x = abs(a-(t-h[i]*0.006))\n print(x)\n if x <= temp:\n ind = i\n temp = x\nprint(ind+1)', 'n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\nbest = float("inf")\nind = 0\nfor i in range(n):\n temp = abs(a-(t- h[i]*0.006))\n print(temp)\n if temp < best:\n ind = i\n best = temp\nprint(ind+1)', 'n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\nind , temp = 0, float("inf")\nfor i in range(n):\n x = abs(a-(t-h[i]*0.006))\n if x <= temp:\n ind = i\n temp = x\nprint(ind+1)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s369660563', 's532653175', 's682666793'] | [3188.0, 3188.0, 3060.0] | [19.0, 19.0, 18.0] | [239, 250, 227] |
p03220 | u185037583 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nh=list(map(lambda x: abs(a-(t-int(x)*0.006)) ,input().split())\nprint(h.index(min(h))+1)', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(lambda x: abs(a-(t-int(x)*0.006)) ,input().split()))\nprint(h.index(min(h))+1)\n'] | ['Runtime Error', 'Accepted'] | ['s506603570', 's367817900'] | [2940.0, 3060.0] | [18.0, 18.0] | [131, 133] |
p03220 | u185325486 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | [" N = int(input())\n T,A = [int(i) for i in input().split(' ')]\n H = [int(i) for i in input().split(' ')]\n minTemp = 600\n \n for i,h in enumerate(H):\n temp = T - h * 0.006\n if abs(temp-A) < minTemp:\n minTemp = abs(temp-A)\n place = i+1\n print(place)", "N = int(input())\nT,A = [int(i) for i in input().split(' ')]\nH = [int(i) for i in input().split(' ')]\nminTemp = 600\n\nfor i,h in enumerate(H):\n temp = T - h * 0.006\n if abs(temp-A) < minTemp:\n minTemp = abs(temp-A)\n place = i+1\nprint(place)"] | ['Runtime Error', 'Accepted'] | ['s765404254', 's529238402'] | [2940.0, 3060.0] | [17.0, 18.0] | [302, 258] |
p03220 | u189397279 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, (input().split(" ")))\nH = list(map(int,input().split(" ")))\nans_t = 10000\nans = 0\nfor i in H:\n t = T - i * 0.006\n l = abs(A - T)\n if l < ans_t:\n ans_t = l\n ans = i\nprint(i)', 'N = int(input())\nT, A = map(int, (input().split(" ")))\nH = list(map(int,input().split(" ")))\nans_t = 10000\nans = 0\n \nfor i in range(len(H)):\n t = T - H[i] * 0.006\n l = abs(A - T)\n if l < ans_t:\n ans_t = l\n ans = i\nprint(ans)', 'N = int(input())\nT, A = map(int, (input().split(" ")))\nH = list(map(int,input().split(" ")))\nans_t = 10000\nans = 0\n \nfor i in range(N):\n t = T - H[i] * 0.006\n l = abs(A - T)\n if l <= ans_t:\n ans_t = l\n ans = i + 1\nprint(ans)', 'N = int(input())\nT, A = map(int, (input().split(" ")))\nH = list(map(int,input().split(" ")))\nans_t = 10000\nans = 0\n \nfor i in range(N):\n t = T - H[i] * 0.006\n l = abs(A - t)\n if l < ans_t:\n ans_t = l\n ans = i + 1\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s310764408', 's350904770', 's934427688', 's356442058'] | [3060.0, 3064.0, 3064.0, 3064.0] | [18.0, 19.0, 18.0, 18.0] | [214, 233, 233, 232] |
p03220 | u189575640 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['from sys import exit\nN = int(input())\nT,A = [int(n) for n in input().split()]\nH = [int(n) for n in input().split()]\nmnear = 0\nmint = (1 << 20)\nfor i in range(N):\n if abs(A - (T - H[i]*0.006)) < mint:\n mint = abs(A - (T - H[i])*0.006)\n mnear = i\n\nprint(mnear+1)\nexit()\n', 'from sys import exit\nN = int(input())\nT,A = [int(n) for n in input().split()]\nH = [int(n) for n in input().split()]\nmnear = 0\nmint = (1 << 20)\nfor i in range(N):\n # print(T - H[i]*0.006)\n if abs(A - (T - H[i]*0.006)) < mint:\n mint = abs(A - (T - H[i]*0.006))\n mnear = i\n\nprint(mnear+1)\nexit()\n'] | ['Wrong Answer', 'Accepted'] | ['s901589382', 's856525870'] | [3060.0, 3060.0] | [19.0, 18.0] | [285, 313] |
p03220 | u190866453 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = int(input().split())\nh = list(map(int, input().split()))\n\nx = []\n\nfor i in h:\n b = t - 0.006 * j - a\n x.append(b)\n\nprint(x.index(min(x)))', 'n = int(input())\nt, a = map(int, (input().split()))\nh = list(map(int, input().split()))\n\nx = []\n\nfor i in h:\n b = abs(t - 0.006 * i - a)\n x.append(b)\n\nprint(x.index(min(x)) + 1)'] | ['Runtime Error', 'Accepted'] | ['s735789589', 's817402471'] | [8964.0, 9268.0] | [22.0, 30.0] | [167, 183] |
p03220 | u192433528 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\nT,A=map(int,input().split())\nH=[abs(A-(T-i*0.006)) for i in map(int,input().split())]\nprint(H)\nprint(H.index(min(H))+1)', 'N=int(input())\nT,A=map(int,input().split())\nH=[abs(A-(T-i*0.006)) for i in map(int,input().split())]\nprint(H.index(min(H))+1)'] | ['Wrong Answer', 'Accepted'] | ['s212437473', 's062974771'] | [3060.0, 3060.0] | [18.0, 17.0] | [134, 125] |
p03220 | u192541825 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nh=[]\nfor i in rrange(n):\n tmp=int(input)\n c=t-tmp*0.006\n h.append(abs(a-c))\n\nm=0\nfor i in range(1,n):\n if(h[i]<h[m]):\n m=i\nprint(m)\n', 'n=int(input())\nt,a=map(int,input().split())\nh=[]\nfor i in range(n):\n tmp=int(input)\n c=t-tmp*0.006\n h.append(abs(a-c))\n\nm=0\nfor i in range(1,n):\n if(h[i]<h[m]):\n m=i\nprint(m)\n', "n=int(input())\nt,a=map(int,input().split())\nh=[]\ntmp=input()\nlst=tmp.split(' ')\n\nfor i in range(n):\n c=t-int(lst[i])*0.006\n h.append(abs(a-c))\n\nm=0\nfor i in range(1,n):\n if(h[i]<h[m]):\n m=i\nprint(m+1)\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s487783233', 's701692249', 's277830731'] | [3060.0, 3060.0, 3064.0] | [18.0, 17.0, 18.0] | [195, 194, 217] |
p03220 | u194894739 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int,input().split()))\nans = 10**4\nfor i in range(N):\n ans = min(ans, abs(A - T + H[i]*0.006))\nprint(ans)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nans = 0\nminDiff = 10**4\nfor i in range(N):\n if minDiff > abs(A - T + H[i]*0.006):\n ans = i\n minDiff = abs(A - T + H[i]*0.006)\nprint(ans + 1)\n'] | ['Wrong Answer', 'Accepted'] | ['s263452703', 's684104196'] | [3060.0, 3060.0] | [18.0, 19.0] | [171, 244] |
p03220 | u197300260 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['\n# Python 3rd Try\n\n\nclass Problem:\n def __init__(self, allnumber, maxthermo, avepoint, highs):\n self.allnumber = allnumber\n self.maxthermo = maxthermo\n self.avepoint = avepoint\n self.highs = highs\n\n def problemprint(self):\n print(self.allnumber)\n print(self.maxthermo)\n print(self.avepoint)\n print(self.highs)\n\n def solve(self):\n maxdiff = 10**9+7\n result = 1\n for j in range(0, self.allnumber):\n difftemp = abs(self.avepoint-(self.maxthermo-self.highs[0]*0.006))\n if difftemp < maxdiff:\n maxdiff = maxdiff\n result = j+1\n return result\n\n\nif __name__ == "__main__":\n N = int(input())\n T, A = map(float, input().split(\' \'))\n HI = list(map(float, input().split(\' \')))\n print(Problem(N, T, A, HI).solve())\n', '\n# Python 3rd Try\n\n\nclass Problem:\n def __init__(self, allnumber, maxthermo, avepoint, highs):\n self.allnumber = allnumber\n self.maxthermo = maxthermo\n self.avepoint = avepoint\n self.highs = highs\n\n def problemprint(self):\n print(self.allnumber)\n print(self.maxthermo)\n print(self.avepoint)\n print(self.highs)\n\n def solve(self):\n maxdiff = 100000.0\n result = 1\n for j in range(0, self.allnumber):\n difftemp = abs(self.avepoint-(self.maxthermo-self.highs[0]*0.006))\n if difftemp < maxdiff:\n maxdiff = maxdiff\n result = j+1\n return result\n\n\nif __name__ == "__main__":\n N = int(input())\n T, A = map(float, input().split(\' \'))\n HI = list(map(float, input().split(\' \')))\n print(Problem(N, T, A, HI).solve())\n', '\n# Python 3rd Try\n\n\nclass Problem:\n def __init__(self, allnumber, maxthermo, avepoint, highs):\n self.allnumber = allnumber\n self.maxthermo = maxthermo\n self.avepoint = avepoint\n self.highs = highs\n\n def problemprint(self):\n print(self.allnumber)\n print(self.maxthermo)\n print(self.avepoint)\n print(self.highs)\n\n def solve(self):\n maxdiff = 100000.0\n result = 1\n for j in range(0, self.allnumber):\n difftemp = abs(self.avepoint-(self.maxthermo-self.highs[j]*0.006))\n# print(\'{}->{}\'.format(maxdiff,difftemp))\n if difftemp < maxdiff:\n maxdiff = difftemp\n result = j+1\n return result\n\n\nif __name__ == "__main__":\n N = int(input())\n T, A = map(float, input().split(\' \'))\n HI = list(map(float, input().split(\' \')))\n print(Problem(N, T, A, HI).solve())\n# print(Problem(2, 12.5, 5.0, [1000.0, 2000.0]).solve())\n# print(Problem(3, 21.0, 11.0, [81234.0, 94124.0, 52141.0]).solve())\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s287651561', 's338120801', 's438981401'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [918, 919, 1106] |
p03220 | u200887663 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nhl=list(map(int,input().split()))\ngap=abs(a-(t-hl[0]*0.006))\nprint(gap)\ncity=1\nfor i in range(2,n+1):\n temp_gap=abs(a-(t-hl[i-1]*0.006))\n print(i,temp_gap)\n if temp_gap<gap:\n gap=temp_gap\n city=i\nprint(city)', 'n=int(input())\nt,a=map(int,input().split())\nhl=list(map(int,input().split()))\n\n\nmn=abs(a-(t-hl[0]*0.006))\ntemp=[]\nfor i in range(n):\n mn=min(mn,abs(a-(t-hl[i]*0.006)))\n temp.append(abs(a-(t-hl[i]*0.006)))\n\nprint(temp.index(mn)+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s862974714', 's967195960'] | [3316.0, 3060.0] | [20.0, 18.0] | [274, 289] |
p03220 | u201856486 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int,input().split())\nh = list(map(int, input().split()))\nk = []\nfor i in h:\n k.append(abs(t - a - i * 0.006))\nprint(hh.index(min(k))+1)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int, input().split()))\nk = []\nfor i in h:\n k.append(abs(t - a - i * 0.006))\nprint(k.index(min(k))+1)'] | ['Runtime Error', 'Accepted'] | ['s707441071', 's564638699'] | [3060.0, 3060.0] | [18.0, 19.0] | [163, 162] |
p03220 | u203898698 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N=int(input())\ntmp=input().split()\nT=int(tmp[0])\nA=int(tmp[1])\nH=input().split()\nH=[abs(A-(T-0.006*int(H[i]))) for i in range(0,N)]\nmin=H[0]\nfor i in range(1,N):\n if min>H[i]:\n min=H[i]\n index=i\nprint(index)', 'N=int(input())\nT,A=map(int, input().split())\nH=list(map(int, input().split()))\nidx=0\nmin=abs(A-T+H[0]*0.006)\nfor i in range(2,len(H)):\n tmp=T-H[i]*0.006\n dist=abs(A-tmp)\n if min > dist:\n min=dist\n idx=i\nprint(idx+1)'] | ['Runtime Error', 'Accepted'] | ['s432231799', 's325246824'] | [3064.0, 3064.0] | [18.0, 18.0] | [224, 224] |
p03220 | u205792168 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=input()\nt,a=input().split()\nb=input().split()\nn=int(n)\nt=int(t)\na=int(a)\nmin=1000\nfor i in range(n):\n diff=abs(a-t+0.006*int(b[i]))\n id=i+1 if min>diff else id\nprint(id)', 'n=input()\nt,a=input().split()\nh=[]\nn=int(n)\nt=int(t)\na=int(a)\nb=input().split()\nmin=1000\nfor i in range(n):\n b[i]=int(b[i])\n if min > abs(a-t+0.006*b[i]):\n min=abs(a-t+0.006*b[i]))\n id=i+1\nprint(id)', 'n=input()\nt,a=input().split()\nn=int(n)\nt=int(t)\na=int(a)\nb=input().split()\nmin=1000\nfor i in range(n):\n diff=abs(a-t+0.006*int(b[i]))\n if min>diff:\n id=i+1\n min=diff\n\nprint (id)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s289720042', 's661479727', 's891076718'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [179, 224, 198] |
p03220 | u207056619 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nprint(min([(abs(a-t+h[i]*0.006),i)for i in range(n)])[1])', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nprint(min([(abs(a-t+h[i]*0.006),i)for i in range(n)])[1]+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s785594960', 's379156091'] | [3188.0, 3188.0] | [18.0, 18.0] | [134, 137] |
p03220 | u214434454 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = 0\ntemp1 = t - h[0] * 0.006\nfor i in range(1,n):\n temp2 = t - h[i] * 0.006\n if abs(temp1-a) > abs(temp2-a):\n ans = i + 1\n temp1 = temp2\nprint(ans)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split))\nans = 0\ntemp1 = t - h[0] * 0.006\nfor i in range(a,n):\n temp2 = t - h[i] * 0.006\n if abs(temp1-a) > abs(temp2-a):\n ans = i\n temp1 = temp2\nprint(ans)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = 0\ntemp1 = t - h[0] * 0.006\nfor i in range(1,n):\n temp2 = t - h[i] * 0.006\n if abs(temp1-a) > abs(temp2-a):\n ans = i\n temp1 = temp2\nprint(ans)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split))\nans = 0\ntemp1 = t - h[0] * 0.006\nfor i in range(1,n):\n temp2 = t - h[i] * 0.006\n if abs(temp1-a) > abs(temp2-a):\n ans = i\n temp1 = temp2\nprint(ans)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\nans = 1\ntemp1 = t - h[0] * 0.006\nfor i in range(1,n):\n temp2 = t - h[i] * 0.006\n if abs(temp1-a) > abs(temp2-a):\n ans = i + 1\n temp1 = temp2\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s390146223', 's585089671', 's681695092', 's888264065', 's972130978'] | [3064.0, 3060.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 17.0, 18.0] | [254, 248, 250, 248, 254] |
p03220 | u214547877 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = list(map(int,input().split()))\nH = list(map(int,input().split()))\nMinDif = 1000\nfor i in range(N):\n Temp = T - H[i] * 0.006\n if abs(Temp - A) == min( MinDif, abs(Temp - A) ):\n MinDif = abs(Temp - A)\n ans = i\nprint(ans)', 'N = int(input())\nT,A = list(map(int,input().split()))\nH = list(map(int,input().split()))\nMinDif = 1000\nfor i in range(N):\n Temp = T - H[i] * 0.006\n if abs(Temp - A) == min( MinDif, abs(Temp - A) ):\n MinDif = abs(Temp - A)\n ans = i + 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s435173796', 's349460093'] | [9200.0, 9216.0] | [28.0, 30.0] | [249, 253] |
p03220 | u214936751 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nheight = list(map(int, input().split()))\ntemperature = [abs(T - i * 0.006) for i in height]\nprint(temperature.index(min(temperature)) + 1)', 'N = int(input())\nT, A = map(int, input().split())\nh = list(map(int, input().split()))\nt = [abs(T - i * 0.006 - A) for i in h]\nprint(h.index(min(t)) + 1)', 'N = int(input())\nT, A = map(int, input().split())\nheight = list(map(int, input().split()))\ntemperature = list(abs(T - i * 0.006) for i in height)\nprint(temperature.index(min(temperature)) + 1)', 'N = int(input())\nT, A = map(int, input().split())\nh = list(map(int, input().split()))\nt = [abs(T - i*0.006-A) for i in h]\nprint(t.index(min(t)) + 1)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s151185676', 's230936861', 's831556262', 's425933937'] | [3188.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 18.0] | [188, 152, 192, 148] |
p03220 | u215743476 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nres = abs(a - (t - h[0] * 0.006))\nans = 0\nfor i in range(len(h)):\n x = h[i]\n res_n = abs(a - (t - x * 0.006))\n # print(res_n)\n if res > res_n:\n res = res_n\n ans = i + 1\n\nprint(ans)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nres = abs(a - (t - h[0] * 0.006))\nans = 1\nfor i in range(len(h)):\n x = h[i]\n res_n = abs(a - (t - x * 0.006))\n # print(res_n)\n if res > res_n:\n res = res_n\n ans = i + 1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s851494108', 's828864955'] | [3064.0, 3064.0] | [18.0, 18.0] | [293, 293] |
p03220 | u217940964 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['import numpy as np\n\nN = int(input())\n\nT, A = map(int, input().split())\n\nH = list(map(int, input().split()))\nH = np.array(H)\n\nH = T - H * 0.006\nans = np.abs(A - H)\nans = np.where(ans == ans.min())[0][0]\n\nprint(ans)', 'import numpy as np\n\nN = int(input())\n\nT, A = map(int, input().split())\n\nH = list(map(int, input().split()))\nH = np.array(H)\n\nH = T - H * 0.006\nans = np.abs(A - H)\nans = np.where(ans == ans.min())[0][0] + 1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s473115618', 's880669835'] | [12488.0, 12488.0] | [159.0, 148.0] | [213, 217] |
p03220 | u220904910 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int, input().split())\nl = list(map(int, input().split()))\nmin=2000\nans = 0\nfor j in range(n):\n if abs(a-t+0.006*l[j]) < min:\n ans=j+1\nprint(ans)', 'n = int(input())\nt,a = map(int, input().split())\nl = list(map(int, input().split()))\nmin=2000\nans = 0\nfor j in range(n):\n if abs(a-t+0.006*l[j]) < min:\n min = abs(a-t+0.006*l[j])\n ans=j+1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s421665193', 's658015490'] | [3060.0, 3188.0] | [20.0, 20.0] | [181, 215] |
p03220 | u221401884 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = [int(num) for num in input().split()]\nH = [int(num) for num in input().split()]\n\nbest_diff = None\nbest_height = None\nfor h in H:\n avg_tmp = T - h * 0.006\n diff = abs(A - avg_tmp)\n\n print(diff)\n\n if best_diff is None:\n best_diff = diff\n best_height = h\n elif diff < best_diff:\n best_diff = diff\n best_height = h\n else:\n pass\n\nprint([i for i, val in enumerate(H, 1)\n if val == best_height][0])\n', 'N = int(input())\nT, A = [int(num) for num in input().split()]\nH = [int(num) for num in input().split()]\n\nbest_diff = None\nbest_height = None\nfor h in H:\n avg_tmp = T - h * 0.006\n diff = abs(A - avg_tmp)\n\n if best_diff is None:\n best_diff = diff\n best_height = h\n elif diff < best_diff:\n best_diff = diff\n best_height = h\n else:\n pass\n\nprint([i for i, val in enumerate(H, 1)\n if val == best_height][0])\n'] | ['Wrong Answer', 'Accepted'] | ['s767528821', 's393668630'] | [3188.0, 3064.0] | [20.0, 19.0] | [475, 458] |
p03220 | u228232845 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\n*h, = map(int, input().split())\ncalc_temp = lambda x: t - x * 0.006\ntemp = calc_temp(h[0])\nans = 0\nfor i in range(n):\n print(calc_temp(h[i]))\n if abs(a - calc_temp(h[i])) < abs(a - temp):\n ans = i\nprint(ans + 1)', 'n = int(input())\nt, a = map(int, input().split())\n*h, = map(int, input().split())\ncalc_diff = lambda x: abs(a - (t - x * 0.006))\n*hdif, = map(calc_diff, h)\nans = hdif.index(min(hdif)) + 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s520504146', 's886100993'] | [3188.0, 3060.0] | [20.0, 18.0] | [274, 198] |
p03220 | u230621983 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nans = 0\nmin_diff = abs(T- max(H)*0.006)\nfor i in range(N):\n temp = T - H[i]*0.006\n if abs(A-temp) < min_diff:\n ans = i+1\n min_diff = A-temp\nprint(ans)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nans = 0\nmin_diff = abs(T- max(H)*0.006)\nfor i in range(N):\n temp = T - H[i]*0.006\n if abs(A-temp) < min_diff:\n ans = i+1\n min_diff = abs(A-temp)\nprint(ans)', "n, t, a, *h = map(int, open(0).read().split())\nans = 0\ndiff_a = float('inf')\nfor i in range(n):\n if diff_a > abs(a - (t - h[i] * 0.006)):\n ans = i+1\n diff_a = abs(a - (t - h[i] * 0.006))\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s725818684', 's910374369', 's501625427'] | [3064.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [244, 249, 214] |
p03220 | u232374873 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['from operator import itemgetter\n\nN = int(input())\nT, A = map(int,input().split())\nH = list(map(int, input().split()))\n\nL = []\nfor i in range(N):\n L.append([i+1,abs(T-H[i]*0.006)])\nL = sorted(L, key=itemgetter(1))\n\nprint(L[0][0])\n', 'from operator import itemgetter\n\nN = int(input())\nT, A = map(int,input().split())\nH = list(map(int, input().split()))\n\nL = []\nfor i in range(N):\n L.append([i+1,abs(T-H[i]*0.006-A)])\nL = sorted(L, key=itemgetter(1))\n\nprint(L[0][0])\n'] | ['Wrong Answer', 'Accepted'] | ['s549341605', 's386401562'] | [3188.0, 3188.0] | [19.0, 20.0] | [232, 234] |
p03220 | u243572357 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nlst = [ abs((t - i * 0.006)-a) for i in list(map(int, input().split()))]\nprint(lst.index(min(lst)))', 'n = int(input())\nt, a = map(int, input().split())\nlst = [ abs((t - i * 0.006)-a) for i in list(map(int, input().split()))]\nprint(lst.index(min(lst)) + 1)\n'] | ['Wrong Answer', 'Accepted'] | ['s886704839', 's395194726'] | [3060.0, 3060.0] | [18.0, 18.0] | [149, 154] |
p03220 | u244836567 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['a=int(input())\nb,c=input().split()\nb=int(b)\nc=int(c)\nl=list(map(int,input().split()))\nfor i in range(a):\n l[0]==abs(c-(b-l[0]*0.006))\nfor i in range(a):\n if l[i]==min.l\n print(i)', 'a=int(input())\nb,c=input().split()\nb=int(b)\nc=int(c)\nl=list(map(int,input().split()))\nfor i in range(a):\n l[0]==abs(c-(b-l[0]*0.006))\nfor i in range(a):\n if l[i]==min(l):\n print(i)', 'a=int(input())\nb,c=input().split()\nb=int(b)\nc=int(c)\nl=list(map(int,input().split()))\nfor i in range(a):\n l[i]=abs(c-(b-l[i]*0.006))\nfor i in range(a):\n if l[i]==min(l):\n print(i+1)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s410797535', 's994353276', 's410531713'] | [8808.0, 9124.0, 9256.0] | [25.0, 43.0, 45.0] | [181, 185, 186] |
p03220 | u249727132 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\n*H, = [map(int, input().split())]\nmin = 10000000\nans = 0\nfor i in range(N):\n if min > abs(A - T + H[i] * 0.006):\n min = abs(A - T + H[i] * 0.006)\n ans = i\nprint(ans)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nX = [abs(A - (T - h*0.006)) for h in H]\nprint(X.index(min(X)) + 1)'] | ['Runtime Error', 'Accepted'] | ['s870153227', 's069460743'] | [3060.0, 3060.0] | [20.0, 18.0] | [233, 152] |
p03220 | u260036763 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = input()\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nT_H = [T - h*0.006 for h in H]\ndiff = [abs(A-t) for t in T_H]\nprint(diff.index(min(diff)))', 'N = input()\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nT_H = [T - h*0.006 for h in H]\ndiff = [abs(A-t) for t in T_H]\nprint(diff.index(min(diff)) + 1)'] | ['Wrong Answer', 'Accepted'] | ['s113032076', 's456463254'] | [3060.0, 3060.0] | [18.0, 19.0] | [171, 175] |
p03220 | u261827653 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int,input().split())\nar = list(map(int,input().split()))\nmxt,tt,ind = 100000000, 0,0\nfor i in range(n):\n tt = t - ar[i]*0.006\n f = 0\n if a<0 and tt < 0:\n f a,tt =1, abs(a),abs(tt)\n if abs(a-tt) < mxt:\n mxt = abs(a-tt)\n ind = i\n if f == 1:\n a = -a\nprint(ind+1)', 'n = int(input())\nt,a = map(int,input().split())\nar = list(map(int,input().split()))\nmxt,tt,ind = 100000000, 0,0\nfor i in range(n):\n tt = t - ar[i]*0.006\n f = 0\n if a<0 and tt < 0:\n f, a,tt =1, abs(a),abs(tt)\n if abs(a-tt) < mxt:\n mxt = abs(a-tt)\n ind = i\n if f == 1:\n a = -a\nprint(ind+1)'] | ['Runtime Error', 'Accepted'] | ['s460810097', 's765440916'] | [2940.0, 3064.0] | [17.0, 19.0] | [329, 330] |
p03220 | u263654061 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\n\nf = lambda x:t-x*0.006\n\ntmp = list(map(f,h))\n\nMIN = 500000000000000000000\nidx = 0\n\nfor i in range(len(tmp)):\n if abs(tmp[i]-a)<MIN:\n print(i, tmp[i])\n MIN = abs(tmp[i]-a)\n idx = i+1\n\nprint(idx)', 'n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\n\nf = lambda x:t-x*0.006\n\ntmp = list(map(f,h))\n\nMIN = 500000000000000000000\nidx = 0\n\nfor i in range(len(tmp)):\n if abs(tmp[i]-a)<MIN:\n MIN = abs(tmp[i]-a)\n idx = i+1\n\nprint(idx)'] | ['Wrong Answer', 'Accepted'] | ['s439776510', 's433294332'] | [3064.0, 3064.0] | [19.0, 19.0] | [303, 278] |
p03220 | u266171694 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nmin = float('inf')\nidx = None\nfor i in range(len(H)):\n if min > abs(A - T + H[i] * 0.006):\n idx = i + 1\n\nprint(idx)", "N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nmin = float('inf')\nidx = None\nfor i in range(len(H)):\n if min > abs(A - T + H[i] * 0.006):\n idx = i + 1å\n\nprint(i)", 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nH = [abs(A - T + h * 0.006) for h in H]\n\nprint(H.index(min(H)) + 1)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s542748971', 's988868733', 's852219018'] | [3064.0, 3064.0, 3060.0] | [18.0, 17.0, 18.0] | [212, 212, 154] |
p03220 | u273038590 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n=int(input())\nT, A = map(int,input().split())\nH=list(map(int,input().split()))\ntemp=[abs(T-x*0.0006-A) for x in H]\nprint(temp.index(min(temp)) + 1)', 'n=int(input())\nT, A = map(int,input().split())\nH=list(map(int,input().split()))\ntemp=[abs(T-x*0.006-A) for x in H]\nprint(temp.index(min(temp)) + 1)'] | ['Wrong Answer', 'Accepted'] | ['s104126813', 's526231078'] | [3060.0, 3060.0] | [18.0, 18.0] | [148, 147] |
p03220 | u276115223 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['# ABC 113: B – Palace\nn = int(input())\nt, a = [int(s) for s in input().split()]\nh = [int(s) for s in input().split()]\ndifference = [abs(a - (t - i * 0.006)) for i in h]\n\nprint(h, difference)\nprint(difference.index(min(difference)) + 1)', '# ABC 113: B – Palace\nN = int(input())\nT, A = map(int, input().split())\nH = [int(s) for s in input().split()]\n\ndiff = [abs(T - h * 0.006 - A) for h in H]\nprint(diff.index(min(diff)) + 1)'] | ['Wrong Answer', 'Accepted'] | ['s401848845', 's267546017'] | [3188.0, 3060.0] | [18.0, 18.0] | [237, 188] |
p03220 | u276204978 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 1\nmn = np.inf\nfor i, h in enumerate(H):\n if mn > abs(A - (T - h * 0.006)):\n ans = i+1\n mn = abs(A - (T - h * 0.006))\nprint(ans)', 'import numpy as np\n\nN = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 1\nmn = np.inf\nfor i, h in enumerate(H):\n if mn > abs(A - (T - h * 0.006)):\n ans = i+1\n mn = abs(A - (T - h * 0.006))\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s418872024', 's560941999'] | [3444.0, 12508.0] | [22.0, 150.0] | [237, 257] |
p03220 | u278260569 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\n\nans_H = (T - A)/0.0006\ndif = 10**20\nans = 0\nfor i in range(len(H)):\n\ttemp_dif = abs(ans_H - H[i])\n\tif (dif > temp_dif):\n\t\tdif = temp_dif\n\t\tans = i + 1\n\t\nprint(ans)\n\t\t\n\t', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\n\nans_H = (T - A)/0.006\nprint(ans_H)\ndif = 10**20\nans = 0\nfor i in range(len(H)):\n\ttemp_dif = abs(ans_H - H[i])\n\tprint(temp_dif)\n\tif (dif > temp_dif):\n\t\tdif = temp_dif\n\t\tans = i + 1\n\t\nprint(ans)\n\t\t\n\t', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\n\nans_H = (T - A)/0.006\ndif = 10**20\nans = 0\nfor i in range(len(H)):\n\ttemp_dif = abs(ans_H - H[i])\n\tif (dif > temp_dif):\n\t\tdif = temp_dif\n\t\tans = i + 1\n\t\nprint(ans)\n\t\t\n\t\n\t\t\n\t'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s071817547', 's463898008', 's045025101'] | [3060.0, 3188.0, 3060.0] | [18.0, 21.0, 18.0] | [252, 281, 256] |
p03220 | u278356323 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['# ABC113b\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**6)\n\nn = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nans = 0\nscore = 9999999\nfor i in range(n):\n if(abs(a-(t-h[i]*0.006)) < score):\n ans = i\n score = abs(t-(12-h[i]*0.006))\nprint(ans+1)', '# ABC113b\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**6)\n\nn = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nans = 0\nfor i in range(n):\n if(abs(a-(t-h[i]*0.006)) <= abs(a-(t-h[ans]*0.006))):\n #print(abs(a-(t-h[i]*0.006)), score)\n ans = i\nprint(ans+1)'] | ['Wrong Answer', 'Accepted'] | ['s984249764', 's178828722'] | [3064.0, 3064.0] | [18.0, 19.0] | [314, 323] |
p03220 | u278864208 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A = map(int,input().split())\nres = 0\ndiff = 100\nHlist = input().split()\nHlist = [int(i) for i in Hlist]\nfor i in range(N):\n H = Hlist[i]\n average = T - H * 0.006\n print(average,diff)\n a = abs(A-average)\n if diff >= a:\n res = i\n diff = min(diff,a)\nprint(res+1)', 'N = int(input())\nT,A = map(int,input().split())\nres = 0\ndiff = 10000\nHlist = input().split()\nHlist = [int(i) for i in Hlist]\nfor i in range(N):\n H = Hlist[i]\n average = T - H * 0.006\n a = abs(A-average)\n if diff >= a:\n res = i\n diff = min(diff,a)\nprint(res+1)'] | ['Wrong Answer', 'Accepted'] | ['s261322895', 's390587131'] | [3316.0, 3064.0] | [22.0, 20.0] | [303, 281] |
p03220 | u281216592 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT,A =[int(i) for i in input().split()]\nH = [int(i) for i in input.split()]\ndiff = (abs(A-(T-H[0]*0.006)))\npalace = 0\nfor i in range(H):\n if(abs(A-(T-H[i]*0.006)) < diff):\n palace = i\n diff = abs(A-(T-H[i]*0.006))\nprint(palace)\n', 'N = int(input())\nT,A =[int(i) for i in input().split()]\nH = [int(i) for i in input().split()]\ndiff = (abs(A-(T-H[0]*0.006)))\npalace = 0\nfor i in range(len(H)):\n if(abs(A-(T-H[i]*0.006)) < diff):\n palace = i\n diff = abs(A-(T-H[i]*0.006))\nprint(palace+1)\n'] | ['Runtime Error', 'Accepted'] | ['s397440540', 's350660977'] | [3064.0, 3064.0] | [18.0, 18.0] | [262, 271] |
p03220 | u282228874 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt,a = map(int,input().split())\nH_list = list(map(int,input().split()))\nt_list = [t-h*0.006 for h in H_list ]\na_list = [abs(a-x) for x in temp_list]\nprint(a_list.index(min(a_list))+1) ', 'n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\ntemprature = []\nfor h in H:\n temprature.append(abs(a-(t-h*0.006)))\nprint(temprature.index(min(temprature))+1)'] | ['Runtime Error', 'Accepted'] | ['s876343992', 's680974942'] | [3060.0, 3060.0] | [18.0, 18.0] | [202, 195] |
p03220 | u284999381 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int,input().split()))\nans = 100\nfor i in N:\n s = T - i*0.006\n ans = min(A-s,ans) \nprint(ans)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int,input().split()))\nans = 100\n\nfor i in N:\n s = T - H(i)*0.006\n ans = min(A-s,ans) \nprint(ans)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int,input().split()))\nans= 0\ntmp = 100000\nfor i in range(N):\n s = T - H[i]*0.006\n if tmp > abs(A - s):\n tmp = abs(A - s )\n ans = i + 1\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s625607106', 's877234802', 's581708989'] | [3060.0, 3060.0, 3064.0] | [17.0, 18.0, 19.0] | [161, 165, 228] |
p03220 | u286955577 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['def solve(N, T, A, H):\n best = (T - A) / 0.006\n index = -1\n diff = -1\n for i in range(N):\n d = abs(best - H[i])\n if diff == -1 or d < diff:\n diff = d\n index = i\n return i + 1\n\n\nN = int(input())\nT, A = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\n\nprint(solve(N, T, A, H))\n', 'def solve(N, T, A, H):\n best = (T - A) * 500 / 3\n index = -1\n diff = 10001\n for i in range(N):\n d = abs(best - H[i])\n if d < diff:\n diff = d\n index = i\n return i + 1\n\n\nN = int(input())\nT, A = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\n\nprint(solve(N, T, A, H))\n', 'def solve(N, T, A, H):\n best = (T - A) / 0.006\n index = -1\n diff = -1\n for i in range(N):\n d = abs(best - H[i])\n if diff == -1 or d < diff:\n diff = d\n index = i\n return index + 1\n\n\nN = int(input())\nT, A = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\n\nprint(solve(N, T, A, H))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327774201', 's964911612', 's486145225'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [348, 339, 352] |
p03220 | u288430479 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nT,A = map(int,input().split())\nh = list(map(int,input().split()))\n#print(h)\nl =[]\nfor i in range(n):\n a = T - h[i]*0.006\n print(a)\n b = abs(a-A)\n l.append(b)\n print(l)\nc = l.index(min(l))\nprint(c+1)', 'n = int(input())\nT,A = map(int,input().split())\nh = list(map(int,input().split()))\n#print(h)\nl =[]\nfor i in range(n):\n a = T - h[i]*0.006\n # print(a)\n b = abs(a-A)\n l.append(b)\n #print(l)\nc = l.index(min(l))\nprint(c+1)'] | ['Wrong Answer', 'Accepted'] | ['s392938851', 's822867591'] | [9460.0, 3064.0] | [369.0, 18.0] | [220, 222] |
p03220 | u290187182 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ["if __name__ == '__main__':\n n = int(input())\n b, c = map(int, input().split())\n list =[]\n min = 110\n d = [int(i) for i in input().split()]\n\n for i in d:\n a =Decimal(i)*Decimal(0.006)\n list.append(abs(c-a))\n if min > abs(c-a):\n min=abs(c-a)\n print(list.index(min)+1)\n\n", "import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\nfrom decimal import *\n\nimport numpy as np\n\nimport math\n\nif __name__ == '__main__':\n n = int(input())\n b, c = map(int, input().split())\n list =[]\n min = 100000\n d = [int(i) for i in input().split()]\n\n for i in d:\n a =b-Decimal(i)*Decimal(0.006)\n diff=0\n if a > c:\n diff =abs(c+a)\n else:\n diff =abs(c-a)\n list.append(diff)\n if min > diff:\n min=diff\n print(list.index(min)+1)\n\n", "import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\nfrom decimal import *\n\nimport numpy as np\n\nimport math\n\nif __name__ == '__main__':\n n = int(input())\n b, c = map(int, input().split())\n list = []\n min = 10000000000\n d = [int(i) for i in input().split()]\n c = c * 1000\n\n for i in d:\n a = b *1000 - i * 6\n diff = 0\n if (a > 0 and c > 0) or (a < 0 and c < 0):\n diff = abs(c - a)\n else:\n diff = abs( a) +abs(c)\n list.append(diff)\n if min > diff:\n min = diff\n print(list.index(min) + 1)"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s291350259', 's666049664', 's802831446'] | [3060.0, 13556.0, 15504.0] | [18.0, 236.0, 158.0] | [320, 632, 692] |
p03220 | u290443463 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['_=input()\nT,A = map(int,input().split())\nH = map(int, input().split())\nmin_i = -1\nmin_d = 10**10\nfor i,h in enumerate(H):\n d = abs(A-(T-h*0.006))\n print(d)\n if d<min_d:\n min_d=d\n min_i=i\nprint(min_i+1)', '_=input()\nT,A = map(int,input().split())\nH = [int(x) for x in input().split()]\nmin_i = -1\nmin_d = 10**10\nfor i,h in enumerate(H):\n d = abs(A-(T-h*0.006))\n if d<min_d:\n min_d=d\n min_i=i\nprint(min_i+1)'] | ['Wrong Answer', 'Accepted'] | ['s752008555', 's411661936'] | [3188.0, 3060.0] | [20.0, 18.0] | [210, 207] |
p03220 | u292735000 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))\n \nprint(t_diff_list.index(min(t_diff_list)))', 'n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))\n\nprint(t_diff_list.index(min(t_val_list)))\n', 'n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_val_list = list(map(lambda x: t - x * 0.006, t_mean_list))\n \ndiff_min = abs(t_val_list[0] - a)\na_min = 0\nfor i in range(1, n):\n diff = abs(t_val_list[i] - a)\n if diff < diff_min:\n diff_min = diff\n a_min = i + 1\n else:\n continue\n \nprint(a_min)', 'n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_val_list = list(map(lambda x: t - x * 0.006, t_mean_list)\n\ndiff_min = math.abs(t_val_list[0] - a)\na_min = 1\nfor i in range(1, n):\n diff = math.abs(t_val_list[i] - a)\n if diff < diff_min:\n diff_min = diff\n a_min = i\n else:\n continue\n\nprint(a_min)', 'n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_val_list = list(map(lambda x: t - x * 0.006, t_mean_list))\n \ndiff_min = abs(t_val_list[0] - a)\na_min = 0\nfor i in range(1, n):\n diff = abs(t_val_list[i] - a)\n if diff <= diff_min:\n diff_min = diff\n a_min = i + 1\n else:\n continue', 'n = int(input())\nt, a = map(int, input().split())\nt_mean_list = list(map(int, input().split()))\nt_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))\n \nprint(t_diff_list.index(min(t_diff_list)) + 1)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s225204479', 's293444749', 's318859909', 's696786613', 's702809355', 's583363953'] | [3060.0, 3060.0, 3064.0, 2940.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 17.0, 18.0, 18.0] | [211, 210, 352, 355, 338, 215] |
p03220 | u292929213 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nres, height = 0, 100001\nfor i in range(N) :\n if height > abs(A - tmp) :\n height = abs(A - tmp)\n res = i + 1\n\nprint(res)', 'N = int(input())\nT, A = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\nres, height = 0, 100001\nfor i in range(N) :\n tmp = T - H[i] * 0.006\n if height > abs(A - tmp) :\n height = abs(A - tmp)\n res = i + 1\n\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s222095630', 's407542741'] | [3060.0, 3064.0] | [18.0, 18.0] | [223, 256] |
p03220 | u293992530 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['import numpy as np\nN = int(input())\nT,A = map(int,input().split())\nH = np.array(list(map(int,input().split())))\np = np.absolute(((T-H*0.006)-A)))\nprint(np.argmin(p)+1)', 'import numpy as np\nN = int(input())\nT,A = map(int,input().split())\nH = np.array(list(map(int,input().split())))\np = np.absolute(((T-H*0.006)-A))\nprint(np.argmin(p)+1)'] | ['Runtime Error', 'Accepted'] | ['s296029341', 's921445525'] | [2940.0, 21528.0] | [17.0, 1320.0] | [167, 166] |
p03220 | u299251530 | 2,000 | 1,048,576 | A country decides to build a palace. In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius. There are N places proposed for the place. The elevation of Place i is H_i meters. Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there. Print the index of the place where the palace should be built. It is guaranteed that the solution is unique. | ['n = input()\nt, a = map(int, input().split())\nh_list = list(map(int, input().split()))\n\ntemp = abs(a - (t - h_list[0] * 0.006))\nresult = 1\ni=1\nfor h in h_list:\n if abs(a - (t - h * 0.006)) < temp:\n temp = abs(a - (t - h * 0.006))\n result = i\n i += 1\nprint(i)', 'n = input()\nt, a = map(int, input().split())\nh_list = list(map(int, input().split()))\n\ntemp = abs(a - (t - h[0] * 0.006))\nresult = 1\ni=1\nfor h in h_list:\n if abs(a - (t - h * 0.006)) < temp:\n temp = abs(a - (t - h * 0.006))\n result = i\n i += 1\nprint(i)', 'n = input()\nt, a = map(int, input().split())\nh_list = list(map(int, input().split()))\n\ntemp = abs(a - (t - h_list[0] * 0.006))\nresult = 1\ni=1\nfor h in h_list:\n if abs(a - (t - h * 0.006)) < temp:\n temp = abs(a - (t - h * 0.006))\n result = i\n i += 1\nprint(result)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s208233217', 's278347552', 's308815205'] | [3060.0, 3060.0, 3060.0] | [20.0, 18.0, 20.0] | [277, 272, 283] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.