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 | u548303713 | 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()))\nmin=10000 \nans=0\n\nfor i in range(n):\n temp=t-h[i]*0.006\n if abs(temp-a)<min:\n ans=i+1\nprint(ans)', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nmin=10000 \nans=0\n\nfor i in range(n):\n temp=t-h[i]*0.006\n #print(temp)\n c=abs(temp-a)\n if c<min:\n ans=i+1\n min=c\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s999827108', 's342736141'] | [3064.0, 3064.0] | [18.0, 18.0] | [199, 247] |
p03220 | u549161102 | 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()))\njudge = abs(A - (T - 0.006*H[0]))\nk = 0\n\nfor i in range(N):\n a = abs(A - (T - 0.006*H[i]))\n if judge > a:\n judge = a\n k = i\n \nprint(k)\n', 'N = int(input())\nT,A = map(int, input().split())\nH = list[input()]\njudge = abs(A - (T - 0.006*H[0]))\nk = 0\n\nfor i in range(N):\n a = abs(A - (T - 0.006*H[i]))\n if judge > a:\n judge = a\n k = i\n \nprint(k)', 'N = int(input())\nT,A = map(int, input().split())\nH = list(map(int, input().split()))\njudge = abs(A - (T - 0.006*H[0]))\nk = 0\n\nfor i in range(N):\n a = abs(A - (T - 0.006*H[i]))\n if judge > a:\n judge = a\n k = i\n \nprint(k+1)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s276528284', 's392362000', 's462009899'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [231, 212, 233] |
p03220 | u550895180 | 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\n\ndef solve(N, T, A, ls_H):\n temperature= []\n difference = []\n near = []\n ti = 10**5//1\n \n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n subtraction = A -y\n difference.append(subtraction)\n #print(difference)\n \n for z in difference : \n near.append(abs(z))\n #print(near)\n \n for i in near :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\nmain()', 'import sys\n \ndef solve(N, T, A, ls_H):\n temperature = []\n difference = []\n near = []\n ti = 10**5//1\n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n til = A - y\n difference.append(til)\n #print(difference)\n \n for z in difference :\n near.append(abs(z))\n #print(near)\n \n for i in near :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n \ndef main():\n print(solve(*readQuestion()))\n # Uncomment before submission\nmain()', 'import sys\n\ndef solve(N, T, A, ls_H):\n temperature= []\n difference = []\n near = []\n ti = 10**5//1\n \n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n subtraction = A -y\n difference.append(subtraction)\n #print(difference)\n \n for z in difference : \n near.append(abs(z))\n print(near)\n \n for i in near :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\n #main()', 'import sys\n\ndef solve(N, T, A, ls_H):\n temperature= []\n difference = []\n near = []\n ti = 10**5//1\n \n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n subtraction = A -y\n difference.append(subtraction)\n #print(difference)\n \n for z in difference : \n near.append(abs(z))\n #print(near)\n \n for i in near :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\nmain()', 'import sys\n\ndef solve(N, T, A, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 10**5//1\n for x in list1 :\n do = T - x * 0.006\n dosi.append(do)\n \n \n for y in dosi :\n ti = A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\nmain()', 'import sys\n\ndef solve(N, T, A, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 10**5//1\n for x in list1 :\n do = T - x * 0.006\n dosi.append(do)\n \n \n for y in dosi :\n ti = A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\n main()', 'import sys\n\ndef solve(N, T, A, ls_H):\n temperature= []\n difference = []\n near = []\n ti = 10**5//1\n \n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n subtraction = A -y\n difference.append(subtraction)\n #print(difference)\n \n for z in difference : \n near.append(abs(z))\n #print(near)\n \n for i in near :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\nmain()', 'import sys\n\ndef solve(N, T, A, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 100000\n for x in ls_H :\n do = T - x * 0.006\n dosi.append(do)\n \n \n for y in dosi :\n ti = A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\n main()', 'import sys\n\ndef solve(N, T, A, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 100000\n for x in ls_H :\n do = T - x * 0.006\n dosi.append(do)\n \n \n for y in dosi :\n ti = A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\n #main()', 'import sys\n\ndef solve(N, T, A, ls_H):\n temperature= []\n difference = []\n near = []\n ti = 10**5//1\n \n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n subtraction = A -y\n difference.append(subtraction)\n #print(difference)\n \n for z in difference : \n near.append(abs(z))\n print(near)\n \n for i in near :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n\ndef main():\n print(solve(*readQuestion()))\n\n# Uncomment before submission\nmain()', 'import sys\n \ndef solve(N, T, A, ls_H):\n temperature = []\n difference = []\n near = []\n ti = 10**5//1\n for x in ls_H :\n air = T - x * 0.006\n temperature.append(air)\n #print(temperature)\n \n for y in temperature :\n til = A - y\n difference.append(til)\n #print(difference)\n \n for z in difference :\n near.append(abs(z))\n #print(near)\n \n for i in near :\n if ti > i :\n ti = i\n #print(ti)\n return near.index(ti) + 1\n\n\ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n \ndef main():\n print(solve(*readQuestion()))\n # Uncomment before submission\nmain()'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s056872626', 's546179208', 's570328840', 's615330706', 's707698100', 's813070176', 's849076253', 's890908764', 's935604090', 's964771465', 's235241518'] | [3064.0, 3184.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3188.0, 3064.0] | [19.0, 20.0, 18.0, 18.0, 18.0, 17.0, 19.0, 17.0, 17.0, 20.0, 18.0] | [860, 868, 861, 860, 822, 824, 860, 821, 822, 859, 866] |
p03220 | u551351897 | 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\nn=int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\ntt = [abs(a - (t-h[i]*0.006)) for i in range(n)]\nans = 1000000000\nfor i in range(n):\n ans = min(ans, tt[i])\nfor i in range(n):\n if tt[i] == ans:\n print(i)\n sys.exit()\n', 'import sys\nn=int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\ntt = [abs(a - (t-h[i]*0.006)) for i in range(n)]\nans = 1000000000\nfor i in range(n):\n ans = min(ans, tt[i])\nfor i in range(n):\n if tt[i] == ans:\n print(i+1)\n sys.exit()'] | ['Wrong Answer', 'Accepted'] | ['s053214748', 's100951159'] | [3064.0, 3064.0] | [19.0, 19.0] | [269, 270] |
p03220 | u551437236 | 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()))\ncount = 1\nss = 1000000000\nans = 0\nfor h in hl:\n if t-h*0.006-a >= 0:\n if float(t-h*0.006-a) < ss:\n ans = count\n count+=1\n else:\n count+=1\n else:\n if float(-t+h*0.006+a) > -ss:\n ans = count\n count+=1\n count+=1\n else:\n\nprint(ans)\n', 'n = int(input())\nt, a = map(int, input().split())\nhl = list(map(int, input().split()))\ncount = 1\nss = 1000000000\nans = 0\nfor h in hl:\n if t-h*0.006-a >= 0:\n if float(t-h*0.006-a) < ss:\n ans = count\n count+=1\n else:\n count+=1\n else:\n if float(-t+h*0.006+a) > -ss:\n ans = count\n count+=1\n else:\n count+=1\n\nprint(ans)\n', 'n = int(input())\nt, a = map(int, input().split())\nhl = list(map(int, input().split()))\nll = [t-h*0.006-a for h in hl]\nans = 1\ndd = 1000000000\nfor i in range(n):\n if ll[i] >= 0 and ll[i] < dd:\n ans = i+1\n dd = ll[i]\n elif ll[i] < 0 and -ll[i] < dd:\n ans = i+1\n dd = -ll[i]\n else:\n pass\n\nprint(ans)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s095538890', 's820369508', 's226172864'] | [3060.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [415, 415, 341] |
p03220 | u552357043 | 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()) \ntmp=10**3\nans=0\nfor i in range(N):\n if abs(A-T+H[i]*0.006)<tmp:\n tmp=abs(A-T+H[i]*0.006)\n ans=i+1\nprint(ans)', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\ntmp = 1000\nans = 0\nfor i in range(N):\n if abs(A-T+H[i]*0.006)<tmp:\n tmp=abs(A-T+H[i]*0.006)\n ans=i+1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s331398053', 's258895658'] | [2940.0, 3060.0] | [17.0, 18.0] | [208, 211] |
p03220 | u556589653 | 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()))\nM = 1000\nans = 1\nfor i in range(N):\n K = abs(A-(T-((int(H[i]))*0.006)))\n if K<M:\n ans = i+1\nprint(ans)\n', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nans = 0\nfor i in range(N-1):\n K = abs(T-((int(H[i+1]))*0.006))\n L = abs(T-((int(H[i]))*0.006))\n if K<L:\n ans = K\n else:\n ans = L\nprint(ans)', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nnow = 99999\nans = 0\nfor i in range(N):\n tem = T - H[i] * 0.006\n if abs(tem - A ) < now:\n now = abs(tem - A)\n ans = i+1\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s393778590', 's911855357', 's565232703'] | [3060.0, 3064.0, 9256.0] | [18.0, 18.0, 26.0] | [194, 237, 220] |
p03220 | u563722393 | 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\nnum = 0\nfor i in range(N):\n deff = abs(T-H[i]*0.006-A)\n if deff < abs(T-H[num]*0.006-A):\n num = i\n\nprint(num)\n', 'N = input()\nT, A = map(int, input.split())\nH = list(map(int, input.split()))\n\nnum = 0\nfor i in range(0, N):\n deff = abs(T-H[i]*0.006-A)\n if deff < abs(T-H[num]*0.006-A):\n num = i\n\nprint(num)', 'N = int(input())\nT, A = map(int, input.split())\nH = [map(int, input.split())]\n\nnum = 0\nfor i in range(N):\n deff = abs(T-H[i]*0.006-A)\n if deff < abs(T-H[num]*0.006-A):\n num = i\n\nprint(num+1)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nnum = 0\nfor i in range(N):\n deff = abs(T-H[i]*0.006-A)\n if deff < abs(T-H[num]*0.006-A):\n num = i\n\nprint(num+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s245800166', 's574777615', 's723689050', 's898547718'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 18.0] | [198, 195, 196, 203] |
p03220 | u566529875 | 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()))\nminimu = 1234567890\n\nfor i in range(n):\n print(abs(t-h[i]*0.006-a))\n if( minimu > abs(t-h[i]*0.006-a)):\n minimu=abs(t-h[i]*0.006-a)\n ans = i+1\nprint(ans)', 'n=int(input())\nt,a=map(int,input().split())\nh = list(map(int,input().split()))\nminimu = 1234567890\nfor i in range(n):\n if( minimu > abs(h[i]*0.006-t):\n minimu=abs(h[i]*0.006-t)\n ans = i+1\nprint(ans)', 'n=int(input())\nt,a=map(int,input().split())\nh=[[abs(t-x*0.006-a)]for x in map(int,input().split())]\nprint(h.index(min(h))+1)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s000144959', 's425572395', 's458988570'] | [3188.0, 2940.0, 3316.0] | [20.0, 17.0, 19.0] | [276, 207, 124] |
p03220 | u569742427 | 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\n\nN,M=map(int,input().split())\nP=[]\nY=[]\nfor _ in range(M):\n data=[int(_) for _ in input().split()]\n P.append(data[0])\n Y.append(data[1])\n\ny=[]\nfor x in range(1,N+1):\n for m in range(M):\n if P[m]==x:\n y.append(Y[m])\n\n ind=numpy.array(y)\n ind=ind.argsort()\n for i,k in enumerate(y):\n Y[Y.index(k)]=ind[i]+1\n y=[]\n\nfor x in range(M):\n xx=str(P[x])\n yy=str(Y[x])\n print(xx.zfill(6)+yy.zfill(6))\n', 'N= int(input())\nT,A=map(int,input().split())\nH=[int(_) for _ in input().split()]\n\nfor i,h in enumerate(H):\n H[i]=abs(T-h*0.006-A)\n\nprint(H.index(min(H))+1)\n'] | ['Runtime Error', 'Accepted'] | ['s809939021', 's747609365'] | [22544.0, 3060.0] | [331.0, 18.0] | [462, 159] |
p03220 | u571199625 | 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()]\n\nn = 0\nfor i in range(N):\n if abs(A - (T - H[i] * 0.006) > abs(A - (T - H[n] * 0.006):\n n = i\n\nprint(n + 1)', 'N = int(input())\nT, A = input().split()\nT = int(T)\nA = int(A)\nH = [int(i) for i in input().split()]\n\nn = 0\nfor i in range(N):\n if abs(A - (T - H[i] * 0.006) > abs(A - (T - H[n] * 0.006):\n n = i\n\nprint(n + 1)', 'N = int(input())\nT, A = input().split()\nT = int(T)\nA = int(A)\nH = [int(i) for i in input().split()]\n\nn = 0\nfor i in range(N):\n if abs(A - (T - H[i] * 0.006)) > abs(A - (T - H[n] * 0.006)):\n n = i\n\nprint(n + 1)', 'N = input()\nT, A = map(int, input().split())\nH = [int(i) for i in input().split()]\n\nn = 0\nfor i in range(N):\n if abs(A - (T - H[i] * 0.006) > abs(A - (T - H[n] * 0.006):\n n = i\n\nprint(n + 1)', 'N = int(input())\nT, A = input().split()\nT = int(T)\nA = int(A)\nH = [int(i) for i in input().split()]\n\nn = 0\nfor i in range(N):\n if abs(A - (T - H[i] * 0.006)) < abs(A - (T - H[n] * 0.006)):\n n = i\n\nprint(n + 1)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s301713760', 's410492367', 's853849673', 's937956755', 's740299515'] | [2940.0, 2940.0, 3064.0, 2940.0, 3064.0] | [18.0, 18.0, 19.0, 19.0, 19.0] | [204, 216, 218, 199, 218] |
p03220 | u571750848 | 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()))\nmylist=[]\n\nfor i in range (N):\n C=12-H[i]*0.006\n D=A-C\n mylist.append(D)\nE=mylist.index(max(mylist))\nF=E+1\nprint(F)', 'N=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))\nmylist=[]\nfor i in range (N):\n C=T-H[i]*0.006\n D=abs(A-C)\n mylist.append(D)\nE=mylist.index(min(mylist))\nF=E+1\nprint(F)'] | ['Wrong Answer', 'Accepted'] | ['s124461792', 's103482579'] | [3060.0, 3060.0] | [19.0, 18.0] | [195, 198] |
p03220 | u572142121 | 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())))\nz = abs(T-H*0.006)\nwhile z \n\n', 'N=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))\nans=10**9\nx=0\nfor i in range(N):\n a=abs(A*1000-(T*1000-H[i]*6))\n if ans > a:\n ans=a\n x=i\nprint(x+1)'] | ['Runtime Error', 'Accepted'] | ['s623278330', 's989886469'] | [2940.0, 3064.0] | [17.0, 18.0] | [108, 184] |
p03220 | u576357314 | 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()))\nfor i in range(n):\n h[i]i=abs(t-h[i]*0.006-a)\nprint(h.index(min(h))+1)', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nfor i in range(n):\n h[i]=abs(t-h[i]*0.006-a)\nprint(h.index(min(h))+1)'] | ['Runtime Error', 'Accepted'] | ['s405374927', 's676495418'] | [2940.0, 3060.0] | [17.0, 18.0] | [150, 149] |
p03220 | u578489732 | 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. | ["# -*- coding: utf-8 -*-\nn = list(map(int, input().split(' '))).pop();\nt,a = list(map(int, input().split(' ')));\nh = list(map(int, input().split(' ')));\n\nre = 1000000\nindex = 0\n\nfor i in range(n):\n t0 = t - h[i] * 0.006\n diff = a - t0\n if ( diff < re ):\n re = diff\n index = i\n\nprint(i+1)", "# -*- coding: utf-8 -*-\nn = list(map(int, input().split(' '))).pop();\nt,a = list(map(int, input().split(' ')));\nh = list(map(int, input().split(' ')));\n\nre = 1000000\nindex = 0\n\nfor i in range(n):\n t0 = t - h[i] * 0.006\n diff = abs(a - t0)\n if ( diff < re ):\n re = diff\n index = i\n\nprint(index + 1)"] | ['Wrong Answer', 'Accepted'] | ['s965752000', 's423152349'] | [3064.0, 3064.0] | [18.0, 20.0] | [309, 320] |
p03220 | u580404776 | 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=[INF,INF]\n\nfor i in range(N):\n if ans[1]> abs(A-(T-H[i]*0.006)):\n ans[0]=i+1\n ans[1]=abs(A-(T-H[i]*0.006))\n \nprint(ans[0])', "N=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))\nINF=float('inf')\nans=[INF,INF]\n\nfor i in range(N):\n if ans[1]> abs(A-(T-H[i]*0.006)):\n ans[0]=i+1\n ans[1]=abs(A-(T-H[i]*0.006))\n \nprint(ans[0])"] | ['Runtime Error', 'Accepted'] | ['s426637542', 's215267527'] | [3060.0, 3064.0] | [18.0, 18.0] | [228, 244] |
p03220 | u580806822 | 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\n[t, a]=[int(i) for i in input().split()]\n\nh=[int(i) for i in input().split()]\n\nans=[]\nfor i in h:\n temp=t-a-0.006*i\n if temp <0:\n ans.append(temp*-1)\n else:\n ans.append(temp)\n\nmi=ans[0]\nnum=-1\nfor j, i in enumerate(ans):\n# print(j,i)\n #print(mi, i)\n if mi > i:\n mi=i\n num=j\n\nprint(num+1)\n', 'n=int(input())\n\n[t, a]=[int(i) for i in input().split()]\n\nh=[int(i) for i in input().split()]\n\nans=[]\nfor i in h:\n temp=t-a-0.006*i\n if temp <0:\n ans.append(temp*-1)\n else:\n ans.append(temp)\n\nmi=ans[0]\nnum=0\nfor j, i in enumerate(ans):\n if mi > i:\n mi=i\n num=j\n\nprint(num+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s915834510', 's728320347'] | [3064.0, 3060.0] | [18.0, 18.0] | [350, 315] |
p03220 | u582543083 | 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())\nli = list(map(int,input().split()))\ntmp = 0\nans_no = 1\nans_val = abs(t - (li[0] * 0.006))\nprint("test",ans_val)\nfor i in range(1,len(li)):\n tmp = abs(t - (li[i] * 0.006))\n if ans_val > tmp:\n ans_val = tmp\n ans_no = i + 1\nprint(ans_no)\n', 'n = int(input())\nt,a = map(int,input().split())\nli = list(map(int,input().split()))\ntmp = 0\nans_no = 1\nans_val = abs(a - (t - (li[0] * 0.006)))\nfor i in range(1,len(li)):\n tmp = abs(a - (t - (li[i] * 0.006)))\n if ans_val > tmp:\n ans_val = tmp\n ans_no = i + 1\nprint(ans_no)\n'] | ['Wrong Answer', 'Accepted'] | ['s752518250', 's781132305'] | [3060.0, 3060.0] | [18.0, 18.0] | [303, 293] |
p03220 | u584529823 | 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())\nHS = list(map(int, input().split()))\n\nresult = 0\nmin_dif = 10000\nfor i in range(N):\n dif = abs(A, T - HS[i] * 0.0060 )\n if dif < min_dif:\n min_dif = dif\n result = i\nprint(result)', 'N = int(input())\nT, A = map(int, input().split())\nHS = list(map(int, input().split()))\n \nresult = 1\nmin_dif = 10000\nfor i in range(N):\n dif = abs(A - (T - HS[i] * 0.0060))\n if dif < min_dif:\n min_dif = dif\n result = i + 1\nprint(result)'] | ['Runtime Error', 'Accepted'] | ['s035284612', 's667961974'] | [3060.0, 3060.0] | [17.0, 18.0] | [228, 243] |
p03220 | u584870699 | 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=int(input())\nA=int(input())\n"候補地の標高"\nH=[]\nfor i in range(N):\n H.append(int(input()))\n\n\ndef abs_1(x):\n return abs(A-(T-x*0.006))\n\nabslists=list(map(abs_1,H))\n\nprint(abslists)\n\nprint(min(abslists))\n\nprint(abslists.index(min(abslists))+1)', 'def abs_1(x):\n return abs(A-(T-x*0.006))\nN=int(input())\nT=int(input())\nA=int(input())\nH=[]\nfor i in range(N):\n H.append(int(input())) \nabslists=list(map(abs_1,H))\nprint(abslists.index(min(abslists))+1)', 'N=int(input())\nT=int(input())\nA=int(input())\n\ndef abs_1(x):\n return abs(A-(T-x*0.006))\n\nH=[]\nfor i in range(N):\n H.append(int(input()))\nabslists=list(map(abs_1,H))\n\nprint(abslists)\n\nprint(min(abslists))\n\nprint(abslists.index(min(abslists))+1)', 'N=int(input())\nT=int(input())\nA=int(input())\n"候補地の標高"\nH=[]\nfor i in range(N):\n H.append(int(input()))\n\n\ndef abs_1(x):\n return abs(A-(T-x*0.006))\n\nabslists=list(map(abs_1,H))\nprint(abslists.index(min(abslists))+1)', 'n=int(input())\nt,a=map(int,input().split())\nlists=[abs(a-(t-x*0.006)) for x in map(int,input().split())]\nprint(lists.index(min(lists))+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s188730706', 's303393782', 's648389174', 's997957225', 's734255647'] | [3064.0, 3060.0, 3064.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [270, 207, 248, 230, 137] |
p03220 | u588093355 | 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, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 100000\n for x in ls_H :\n do = T - x * 0.006\n dosi.append(do)\n \n \n for y in dosi :\n ti = A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n \n \ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n \ndef main():\n print(solve(*readQuestion()))\n \n# Uncomment before submission\nmain()', 'def solve(N, T, A, ls_H):\n dosi = []\n titen = []\n titen1 = []\n ti = 100000 * 1000\n for x in ls_H :\n do = 1000 * T - x * 6\n dosi.append(do)\n \n \n for y in dosi :\n ti = 1000 * A - y\n titen.append(ti)\n \n \n for z in titen :\n titen1.append(abs(z))\n \n \n for i in titen1 :\n if ti > i :\n ti = i\n #print(ti)\n return titen1.index(ti) + 1\n \n \ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n \ndef main():\n print(solve(*readQuestion()))\n \n# Uncomment before submission\nmain()\n', 'import sys\n \ndef solve(N, T, A, ls_H):\n return min([(abs(A - (T - h * 0.006)), i) for (i, h) in enumerate(ls_H, start=1)])[1]\n \ndef readQuestion():\n ws = sys.stdin.readline().strip().split()\n N = int(ws[0])\n ws = sys.stdin.readline().strip().split()\n T = int(ws[0])\n A = int(ws[1])\n ws = sys.stdin.readline().strip().split()\n ls_H = list(map(int, ws))\n return (N, T, A, ls_H)\n \ndef main():\n print(solve(*readQuestion()))\n \n# Uncomment before submission\nmain()\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s182545150', 's360653029', 's893675952'] | [3064.0, 3064.0, 3188.0] | [17.0, 17.0, 20.0] | [812, 830, 490] |
p03220 | u589432040 | 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 range(N):\n H.append(input())\n\nl = []\nfor i in range(N):\n l.append(abs(A - (T - 0.006 * H[i])))\nprint(l.index(min(l))+1)', 'N = int(input())\nT, A = map(int, input().split())\nH = []\nH = list(map(int,input().split()))\n\nl = []\nfor i in range(N):\n l.append(abs(A - (T - 0.006 * H[i])))\nprint(l.index(min(l))+1)'] | ['Runtime Error', 'Accepted'] | ['s278772843', 's935511219'] | [3060.0, 3060.0] | [18.0, 19.0] | [189, 185] |
p03220 | u593063683 | 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. | ['#B\nN = int(input())\nT, A = [int(x) for x in input().split()]\nH = [int(x) for x in input().split()]\n#print(N, T, A)#\n#print(H)#\n\ndef dif(h):\n return abs(T - h*0.006 - A)\n\nneari = 0\nnearDif = dif(H[0])\nfor i in range(N):\n #print(i, H[i])#\n idif = dif(H[i])\n if idif<nearDif:\n neari = i\n nearDif = idif\n #print(i, nearDif)\nprint(i+1)\n\n', '#B\nN = int(input())\nT, A = [int(x) for x in input().split()]\nH = [int(x) for x in input().split()]\nprint(N, T, A)#\nprint(H)#\n\ndef dif(h):\n return abs(T - h*0.006 - A)\n\nneari = 0\nnearDif = dif(H[0])\nfor i in range(N):\n print(i, H[i])#\n idif = dif(H[i])\n if idif<nearDif:\n neari = i\n nearDif = idif\n print(i, nearDif)\nprint(i+1)\n\n', '#B\nN = int(input())\nT, A = [int(x) for x in input().split()]\nH = [int(x) for x in input().split()]\n#print(N, T, A)#\n#print(H)#\n\ndef dif(h):\n return abs(T - h*0.006 - A)\n\nneari = 0\nnearDif = dif(H[0])\nfor i in range(N):\n #print(i, H[i])#\n idif = dif(H[i])\n if idif<nearDif:\n neari = i\n nearDif = idif\n #print(i, nearDif)\nprint(neari+1)\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s330600974', 's928905809', 's386644329'] | [3060.0, 3444.0, 3060.0] | [19.0, 20.0, 19.0] | [365, 361, 369] |
p03220 | u595657182 | 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 main():\n N = int(input())\n TA = list(map(int, input().split()))\n T, A = TA[0], TA[1]\n H = list(map(int, input().split()))\n arr = []\n ondo = 0\n for i in range(N):\n ondo = int(T - H[i] * 0.006)\n arr.append([ondo, i+1])\n for j in range(1, N):\n res1 = A - arr[j-1][0]\n res2 = A - arr[j][0]\n if res1 < res2:\n ans = arr[j-i][1]\n else:\n ans = arr[j][1]\n print(ans)\nmain(', "def main():\n N = int(input())\n TA = list(map(int, input().split()))\n T, A = TA[0], TA[1]\n H = list(map(int, input().split()))\n\n temp1 = abs(A - (T - H[0] * 0.006))\n pos = 0\n\n for i in range(1, N):\n temp2 = abs(A - (T - H[i] * 0.006))\n if temp1 > temp2:\n temp1 = temp2\n pos = i\n print(pos+1)\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s196848400', 's283005887'] | [3064.0, 3064.0] | [17.0, 18.0] | [458, 391] |
p03220 | u597455618 | 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\nfor i in range(n):\n temp = t\n if abs(a - temp) >= abs(a - (t - h[i]* 0.006)):\n ans = i + 1\n temp = t - h[i]* 0.006\nprint(ans)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\nx = [abs(a - (t - i*0.006)) for i in h]\nprint(x.index(min(x))+1)'] | ['Wrong Answer', 'Accepted'] | ['s170172219', 's289666498'] | [3060.0, 3060.0] | [18.0, 18.0] | [228, 150] |
p03220 | u600717568 | 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())\na=[]\nfor i in range(N):\n a.append(abs(T-List[i]*0.006-A))\nprint(index(min(a))+1) \n', 'N=int(input())\nT,A=map(int,input().split())\nList=list(map(int,input().split()))\na=[]\nfor i in range(N):\n a.append(abs(T-List[i]*0.006-A))\nprint(a.index(min(a))+1) \n'] | ['Runtime Error', 'Accepted'] | ['s795285740', 's463582910'] | [2940.0, 3060.0] | [17.0, 18.0] | [170, 173] |
p03220 | u602715823 | 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_diff_t = 10e6\nans = 0\n\nfor i, e in enumerate(h):\n d = abs(a - (t - 0.006 * e))\n\n if d < min_diff_t:\n ans = i + 1\n\nprint(ans)\n', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nmin_diff_t = 10e6\nans = 0\n\nfor i, e in enumerate(h):\n ti = t - 0.006 * e\n d = abs(a - ti)\n\n if d < min_diff_t:\n min_diff_t = d\n ans = i + 1\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s455312736', 's440740851'] | [3060.0, 3060.0] | [18.0, 18.0] | [229, 262] |
p03220 | u602863587 | 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()))\nL=list()\n\nfor i in range(len(H)):\n H[i]=abs(1000*a-t*1000-H[i]*6)\n \nprint(H.index(min(H)))\n', 'n=int(input())\nt,a=list(input().split())\nH=list(input().split())\nL=list()\n\nfor i in range(H):\n Ave_temparature=abs(float(a)-float(t-H[i]*0.006))\n L.append(Ave_temparature)\n \nprint(min(L))', 'n=int(input())\nt,a=list(map(int,input().split()))\nH=list(map(int,input().split()))\nL=list()\n\nfor i in range(0,len(H)):\n H[i]=abs(1000*a-t*1000+H[i]*6)\n \nprint(H.index(min(H)))\n\n', 'n=int(input())\nt,a=list(input().split())\nH=list(input().split())\nL=list()\n\nfor i in range(H):\n Ave_temparature=abs(float(a)-float(t)-float(H[i])*0.006)\n L.append(Ave_temparature)\n \nprint(min(L))\n', 'n=int(input())\nt,a=list(map(int,input().split()))\nH=list(map(int,input().split()))\nL=list()\n\nfor i in range(len(H)):\n Ave_temparature=abs(1000*a-t*1000-H[i]*6)\n L.append(Ave_temparature)\n \nprint(L.index(min(L)))', 'n=int(input())\nt,a=list(input().split())\nH=list(input().split())\nL=list()\n\nfor i in range(H):\n Ave_temparature=abs(float(a)-(float(t)-float(H[i])*0.006))\n L.append(Ave_temparature)\n \nprint(min(L))\n', 'n=int(input())\nt,a=list(map(int,input().split()))\nH=list(map(int,input().split()))\nL=list()\n\nfor i in range(len(H)):\n d=abs(1000*a-t*1000-H[i]*6)\n d1=d\n if d<d1:\n continue\n else:\n break\n \nprint(i)\n', 'n=int(input())\nt,a=list(map(int,input().split()))\nH=list(map(int,input().split()))\n\nfor i in range(0,len(H)):\n H[i]=abs(1000*a-t*1000+H[i]*6)\n \nprint(H.index(min(H))+1)\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s171015273', 's282884764', 's385048139', 's623220509', 's708762342', 's714576993', 's793769893', 's833380361'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 17.0, 20.0, 17.0, 18.0, 18.0, 17.0, 17.0] | [176, 190, 179, 198, 214, 200, 208, 171] |
p03220 | u606033239 | 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()))\ns = []\n\nfor i in range(n):\n s.append(abs(a-t+i*0.006))\n\nprint(s.index(min(s))+1)', 'n = int(input())\nt,a = map(int,input().split())\ns = []\nf = 1\nfor i in range(1,n+1):\n h = int(input())\n d = int(abs(a-t-h*0.006))\n s.append(d)\n if d == min(s):\n f = i\nprint(f)\n', 'n = int(input())\na,t = map(int,input().split())\ns = 0\nt = 1\nfor i in range(1,n+1):\n h = int(input())\n if a-t-h*0.006 <= s:\n t = i \nprint(i) ', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\ns = []\nfor i in h:\n s.append(abs(a-t+i*0.006))\n \nprint(s.index(min(s))+1)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s071901520', 's293433276', 's926855834', 's887451707'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 19.0] | [166, 193, 155, 162] |
p03220 | u606523772 | 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()))\nmin_err = 10000\nnum = -1\nfor i in range(N):\n temperture = T-H_list[i]*0.006\n err = abs(A - temperture)\n print(err)\n if err < min_err:\n min_err = err\n num = i\nprint(num+1)', 'N = int(input())\nT, A = map(int, input().split())\nH_list = list(map(int, input().split()))\nmin_err = 10000\nnum = -1\nfor i in range(N):\n temperture = T-H_list[i]*0.006\n err = abs(A - temperture)\n if err < min_err:\n min_err = err\n num = i\nprint(num+1)'] | ['Wrong Answer', 'Accepted'] | ['s773067583', 's065637832'] | [3188.0, 3064.0] | [19.0, 18.0] | [287, 272] |
p03220 | u610473220 | 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()))\ndH =[]\nfor i in H:\n dH.appendabs((A - T + 0.006 * i))\nmin_dH = min(dH)\nprint(dH.index(min_dH) + 1)', 'N = int(input())\nT, A= map(int, input().split())\nH = list(map(int, input().split()))\ndH =[0]\nfor i in range(N):\n dH[i] = A + 0.006 * H[i]\nmin_dH = min(dH)\nprint(dH.index(min_dH) + 1)', 'N = int(input())\nT, A= map(int, input().split())\nH = list(map(int, input().split()))\ndH =[]\nfor i in H:\n dH.append(abs(A - (T - 0.006 * i)))\nprint(dH.index(min(dH)) + 1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s097859690', 's466327203', 's480643998'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [186, 185, 172] |
p03220 | u612968535 | 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()\ntargets = input().split()\n\nresult = 0\nmin = 0\n\nfor i, target in enumerate(targets):\n temp = int(int(T) - int(target) * 0.006)\n temp2 = abs(int(A) - int(temp))\n print(int(A))\n print(temp)\n print(temp2)\n if i == 0:\n result = i + 1\n min = temp2\n elif temp2 < min :\n result = i +1 \n min = temp2\n \nprint(result)\n', 'N = input()\nT, A = map(int, input().split())\ntargets = list(map(int, input().split()))\n \nresult = 0\nmin = 0\n \nfor i, target in enumerate(targets):\n temp = T - target * 0.006 \n if i == 0:\n result = i + 1\n min = abs( A - temp )\n elif abs( A - temp ) < min :\n result = i +1 \n min = abs( A - temp )\n \nprint(result)'] | ['Wrong Answer', 'Accepted'] | ['s421323969', 's455644480'] | [3444.0, 3064.0] | [21.0, 18.0] | [362, 325] |
p03220 | u617023079 | 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())\nt,a = map(int, input().split())\nh = input().split()\n\nh = np.array(h, dtype = float)\nh = t - 0.006 * h\nh = abs(a-h)\nprint(np.argmin(h))\n\n\n\n\n\n', 'import numpy as np\n\nn = int(input())\nt,a = map(int, input().split())\nh = input().split()\n\nh = np.array(h, dtype = float)\nh = t - 0.006 * h\nh = abs(a-h)\nprint(np.argmin(h)+1)\n\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s169393231', 's605778440'] | [20128.0, 12396.0] | [293.0, 150.0] | [177, 179] |
p03220 | u618373524 | 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()))\nmaxi = 10**5+51\nans = 0\nfor i in H_list:\n if abs(A-T+0.006*i) <= maxi :\n maxi = abs(A-i)\n ans = H_list.index(i)\nprint(ans+1)', 'n = int(input())\nT,A = map(int,(input().split()))\nH_list= list(map(int,input().split()))\nmaxi = 10**5+51\nans = 0\nfor i in H_list:\n if abs(A-T-0.006*i) < maxi :\n maxi = abs(A-i)\n ans = H_list.index(i)\nprint(ans+1)', 'n = int(input())\nT,A = map(int,(input().split()))\nH_list= list(map(int,input().split()))\n\nz = [abs(T-0.006*i-A) for i in H_list]\nprint(z.index(min(z))+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s192078586', 's880976750', 's756570900'] | [3060.0, 3060.0, 3060.0] | [25.0, 25.0, 18.0] | [230, 229, 154] |
p03220 | u619090855 | 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()]\n\ndiff_min = 999999999\ndiff_i = 0\nH = [int(i) for i in input().split()]\nfor i, n in enumerate(H):\n diff = A - (T - 0.006*n)\n if diff < diff_min:\n diff = diff_min\n diff_i = i + 1\n\nprint(diff_i)\n', 'import math\n\nN = int(input())\nT, A = [int(i) for i in input().split()]\n\ndiff_min = 999999999\ndiff_i = 0\nH = [int(i) for i in input().split()]\nfor i, n in enumerate(H):\n diff = math.fabs(A - (T - 0.006*n))\n if diff < diff_min:\n diff = diff_min\n diff_i = i + 1\n\nprint(diff_i)\n', 'import math\n\nN = int(input())\nT, A = [int(i) for i in input().split()]\n\ndiff_min = 999999999\ndiff_i = 0\nH = [int(i) for i in input().split()]\nfor i, n in enumerate(H):\n diff = math.abs(A - (T - 0.006*n))\n if diff < diff_min:\n diff = diff_min\n diff_i = i + 1\n\nprint(diff_i)\n', 'import math\n\nN = int(input())\nT, A = [int(i) for i in input().split()]\n\ndiff_min = 999999999\ndiff_i = 0\nH = [int(i) for i in input().split()]\nfor i, n in enumerate(H):\n diff = math.fabs(A - (T - 0.006*n))\n if diff < diff_min:\n diff_min = diff\n diff_i = i + 1\n\nprint(diff_i)\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s031772732', 's736447288', 's827810187', 's833987457'] | [3060.0, 3060.0, 3060.0, 3060.0] | [20.0, 18.0, 18.0, 18.0] | [270, 294, 293, 294] |
p03220 | u619819312 | 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 range(0,n):\n k.append([h[i],i+1])\nk.sort()\nprint(k)\ns=(t-a)/(6*(10**(-3)))\nfor i in range(1,n):\n if s-k[i][0]<0:\n if abs(s-k[i][0])>abs(s-k[i-1][0]):\n print(k[i-1][1])\n break\n else:\n print(k[i][1])\n break', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nk=[]\nfor i in range(0,n):\n k.append([h[i],i+1])\nk.sort()\ns=(t-a)/(6*(10**(-3)))\nfor i in range(1,n):\n if s-k[i][0]<0:\n if abs(s-k[i][0])>abs(s-k[i-1][0]):\n print(k[i-1][1])\n break\n else:\n print(k[i][1])\n break'] | ['Wrong Answer', 'Accepted'] | ['s556179900', 's528703633'] | [3188.0, 3188.0] | [19.0, 18.0] | [359, 350] |
p03220 | u620846115 | 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()))\nTH = []\nfor i in n:\n TH.append(abs(T-int(T-0.006*H[i])))\nprint(TH.index(min(TH))+1)', 'n = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nTH = []\nfor i in range(n):\n TH.append(abs(A-T+0.006*H[i]))\nprint(TH.index(min(TH))+1)'] | ['Runtime Error', 'Accepted'] | ['s718311004', 's266643551'] | [9136.0, 9300.0] | [28.0, 29.0] | [167, 169] |
p03220 | u623687794 | 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 = [int(input()) for i in range(N)]\nsubduction = [float(abs(t-height[i]*0.006-a)) for i in range(N)]\nprint(min(subduction)) \n', 'n = int(input())\nt,a = map(int,input().split())\nheight = [int(input()) for i in range(N)]\nsubduction = [float(abs(t-height[i]*0.006-a)) for i in range(N)]\nprint(min(subduction)) ', 'N = int(input())\nt,a = map(int,input().split())\nheight = list(map(int,input().split()))\nsubduction = [float(abs(t-height[i]*0.006-a)) for i in range(N)]\nans = float(10**7)\nlst = []\nfor i in range(N):\n if ans > subduction[i]:\n ans = subduction[i]\n lst.append(i)\nprint(lst[-1])\n \n', 'N = int(input())\nt,a = map(int,input().split())\nheight = list(map(int,input().split()))\nsubduction = [float(abs(t-height[i]*0.006-a)) for i in range(N)]\nans = float(10**7)\nlst = []\nfor i in range(N):\n if ans > subduction[i]:\n ans = subduction[i]\n lst.append(i)\nprint(lst[-1]+1)\n \n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s085217188', 's529561701', 's537399947', 's765708222'] | [3060.0, 3060.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [179, 178, 286, 288] |
p03220 | u623735583 | 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(x) for x in input().split())\nb = list(map(int,input().split()))\nc = []\n\nfor i in b:\n c.append(abs((t - i * 0.006))-a)\n \nprint(c.index(min(c))+1)', 'n = int(input())\nt,a = (int(x) for x in input().split())\nb = list(map(int,input().split()))\nc = []\n\nfor i in b:\n c.append(abs((t - i * 0.006)-a))\n \nprint(c.index(min(c))+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s616077109', 's274648790'] | [3060.0, 3060.0] | [18.0, 18.0] | [174, 175] |
p03220 | u625495026 | 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())\na = list(map(int,input().split()))\nmin_val = T-A\nn = 1\nfor i in range(len(a)):\n if abs(T-0.006*i-A) <= min_val:\n min_val = abs(T-0.006*i-A)\n min_num = n\n n += 1\nprint(min_num)', 'input()\nT,A = map(int,input().split())\na = list(map(int,input().split()))\nmin_val = T-A\nfor i in range(len(a)):\n print("min_val={}".format(min_val))\n if abs(T-0.006*a[i]-A) <= min_val:\n min_val = abs(T-0.006*a[i]-A)\n min_num = i\nprint(min_num+1)', 'input()\nT,A = map(int,input().split())\na = list(map(int,input().split()))\nmin_val = T-A\nfor i in range(len(a)):\n print("min_val={}".format(min_val))\n if abs(T-0.006*a[i]-A) <= min_val:\n min_val = abs(T-0.006*a[i]-A)\n min_num = i\nprint(min_num+1)', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nd = [abs(T-0.006*i-A) for i in H]\nprint(d.index(min(d))+1)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s275141667', 's464060918', 's825219165', 's056478129'] | [3060.0, 3188.0, 3188.0, 3060.0] | [18.0, 20.0, 20.0, 18.0] | [234, 265, 265, 141] |
p03220 | u626337957 | 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\nmin_diff = 10*5\nfor i in range(N):\n if abs((T - H*0.006) - A) < min_diff:\n ans = i+1\n min_diff = abs((T - H*0.006) - A)\nprint(ans)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\nmin_diff = 10*5\nfor i in range(N):\n if abs((T - H[i]*0.006) - A) < min_diff:\n ans = i+1\nprint(ans)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\nmin_diff = 10*5\nfor i in range(N):\n if abs((T - H*0.006) - A) < min_diff:\n ans = i+1\nprint(ans)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\nmin_diff = 10**5\nfor i in range(N):\n if abs((T - H[i]*0.006) - A) < min_diff:\n ans = i+1\n min_diff = abs((T - H[i]*0.006) - A)\nprint(ans)\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s406362761', 's471343783', 's587627832', 's028444168'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 19.0, 18.0, 18.0] | [233, 198, 194, 240] |
p03220 | u626467464 | 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())\nline = input().split()\nt = int(line[0])\na = int(line[1])\ntemps = map(int,input().split())\ntemps = list(temps)\nplaces = {}\ncount = len(temps)\nfor i in range(count):\n places[i] = abs(a - (t - 0.006 * temps[i]))\nanswer = min(places.items(),key = lambda x:x[1])[0]\nprint(answer)', 'n = int(input())\nline = input().split()\nt = int(line[0])\na = int(line[1])\ntemps = map(int,input().split())\ntemps = list(temps)\nplaces = {}\ncount = len(temps)\nfor i in range(count):\n places[i] = abs(a - (t - 0.006 * temps[i]))\nanswer = min(places.items(),key = lambda x:x[1])[0] + 1\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s335861650', 's737662750'] | [3188.0, 3188.0] | [18.0, 18.0] | [292, 296] |
p03220 | u626468554 | 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\nmemo = 10**5\nfor i in range(n):\n if (t-h[i]*0.006) < memo:\n ans = i+1\nprint(ans)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int,input().split()))\n\nmemo = 10**5\nfor i in range(n):\n if abs((t-h[i]*0.006)-a) < memo:\n ans = i+1\n memo = abs((t-h[i]*0.006)-a)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s286735162', 's664466953'] | [3060.0, 3060.0] | [18.0, 18.0] | [174, 218] |
p03220 | u629276590 | 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=0\nm=100000000000000\nfor i in range(1,n+1):\n b=a-t+i*0.006\n if m>abs(b):\n m=abs(b)\n k=i+1\n\n\nprint(k) ', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\n\nk=0\nm=100000000000000\nfor i in range(1,n+1):\n b=a-t+i*0.006\n if m>abs(b):\n m=abs(b)\n k=i\n\n\nprint(k) \n ', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\n\nk=0\nm=100000000000000\nfor i in range(1,n+1):\n b=a-t+h[i]*0.006\n if m>abs(b):\n m=abs(b)\n k=i\n\n\nprint(k) \n ', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\n\nk=0\nm=100000000000000\nfor i in range(1,n+1):\n b=a-t+h[i-1]*0.006\n if m>abs(b):\n m=abs(b)\n k=i\n\n\nprint(k) \n '] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s048972112', 's348441325', 's429297899', 's987702393'] | [9168.0, 9120.0, 9200.0, 9084.0] | [29.0, 29.0, 30.0, 33.0] | [204, 214, 217, 219] |
p03220 | u629540524 | 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()))\na = 10**9\nfor i in range(n):\n c = h[i]*0.006\n if abs(a-c)<a:\n a=a-c\n d=i\nprint(d+1)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int, input().split()))\na = 10**9\nfor i in range(n):\n c = h[i]*0.006\n if abs(a-c)<a:\n a=abs(a-c)\n d=i\nprint(d+1)', 'n = int(input())\nt,a = map(int,input().split())\nh = list(map(int, input().split()))\nb = 10**9\nfor i in range(n):\n c = abs(a-(t-h[i]*0.006))\n if c<b:\n b=c\n d=i\nprint(d+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s646387511', 's846448627', 's035304484'] | [9268.0, 9280.0, 9224.0] | [28.0, 28.0, 29.0] | [187, 192, 189] |
p03220 | u633548583 | 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())\nH=list(map(int,input().split()))\nli=[]\n\ns=li.append(abs(A-(T-0.006*H)))\n\nprint(s.index(min(s))+1)', 'N=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))\nli=[]\nfor h in H:\n li.append(abs(A-(T-0.006*h)))\nprint(li.index(min(li))+1)\n'] | ['Runtime Error', 'Accepted'] | ['s175548351', 's663083126'] | [3060.0, 3060.0] | [17.0, 20.0] | [129, 156] |
p03220 | u633914031 | 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())\nN=list(map(int,input().split()))\ntemp=list(map(lambda x: abs(A-(T-0.006*x)),N))\ntemp.index(min(temp)+1)', 'N=int(input())\nT, A=map(int, input().split())\nN=list(map(int,input().split()))\ntemp=list(map(lambda x: abs(A-(T-0.006*x)),N))\ntemp.index(min(temp))', 'N=int(input())\nT, A=map(int, input().split())\nN=list(map(int,input().split()))\ntemp1=list(map(lambda x: (T-0.006*x),N))\ntemp=list(map(lambda x: abs(A-(T-0.006*x)),N))\nprint(temp.index(min(temp))+1)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s089787151', 's789495699', 's236731254'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [149, 147, 197] |
p03220 | u634046173 | 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\ninput = sys.stdin.readline\nN = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nm = 1 \nmindis = T-H[0]*0.006\nfor i in range(1,N):\n if mindis > T-H[i]*0.006:\n m = i+1\n mindis = T-H[i]*0.006\nprint(m)\n ', 'N = int(input())\nT,A = map(int,input().split())\nH = list(map(int,input().split()))\nm = 1 \nmindis = abs(A-(T-H[0]*0.006))\nfor i in range(1,N):\n cd = abs(A-(T-H[i]*0.006))\n if mindis > cd:\n m = i+1\n mindis = cd\nprint(m)'] | ['Wrong Answer', 'Accepted'] | ['s286919926', 's019028396'] | [9272.0, 9264.0] | [31.0, 31.0] | [254, 225] |
p03220 | u635273885 | 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())\npalace = [abs(T - (int(x)*0.006) -A) for x in input().split('')]\nprint(palace.index(min(min(palace)+1)))", 'N = int(input())\nT, A = map(int, input().split())\npalace = [abs(T - (int(x)*0.006) - A) for x in input().split()]\nprint(palace.index(min(palace))+1)'] | ['Runtime Error', 'Accepted'] | ['s433542936', 's550274500'] | [3060.0, 3060.0] | [17.0, 18.0] | [154, 148] |
p03220 | u635974378 | 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 = list(map(int, input().split()))\nHs = list(map(int, input().split()))\n\nsHs = []\nfor idx,h in enumerate(Hs):\n sHs.append((h, idx))\n\nsHs = sorted(sHs)\n\nlast = 99999999999999\nlastidx = -1\nfor sh in sHs:\n dif = abs(A - (T - 0.006 * sh[0]))\n if last > dif:\n last = dif\n lastidx = sh[1]\n\n\nprint(lastidx)', 'N = input()\nT, A = list(map(int, input().split()))\nHs = list(map(int, input().split()))\n\nlast = 99999999999999\nlastidx = -1\nfor idx, h in enumerate(Hs):\n dif = abs(A - (T - 0.006 * h))\n if last > dif:\n last = dif\n lastidx = idx + 1\n\n\nprint(lastidx)'] | ['Wrong Answer', 'Accepted'] | ['s903464218', 's155201285'] | [3188.0, 3060.0] | [18.0, 18.0] | [324, 256] |
p03220 | u636162168 | 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()))\nh=list(map(lambda x:t-x*0.006-a,h))\nprint(h.index(min(h))+1)\n', 'n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nh=list(map(lambda x:t-x*0.006,h))\ntmp=[abs(i-a) for i in h]\nprint(tmp.index(min(tmp))+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s185869820', 's695618791'] | [3060.0, 3188.0] | [19.0, 18.0] | [138, 166] |
p03220 | u636822224 | 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 math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input())\nt_list=[]\nfor i in range(n):\n math.fabs(t-h[i]*0.006-a)\nprint(min(t_list))', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nbefore=math.fabs(t-h[0]*0.006-a)\nnum=1\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n print(diff)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n num=i+2\nprint(num)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input())\nbefore=math.fabs(t-h[0]*0.006-a)\nmi=0\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n if diff<0:\n mi=i+1\nprint(mi)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nbefore=math.fabs(t-h[0]*0.006-a)\nnum=1\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n print(diff)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n num=i+1\nprint(num)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input())\nbefore=math.fabs(t-h[0]*0.006-a)\nmi=0\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n mi=i+1\nprint(mi)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input())\nbefore=math.fabs(t-h[0]*0.006-a)\nprint(before)\nmi=0\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n mi=i+1\nprint(mi)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nbefore=math.fabs(t-h[0]*0.006-a)\nmi=0\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n mi=i+1\nprint(mi)', 'import math\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nbefore=math.fabs(t-h[0]*0.006-a)\nnum=1\nfor i in range(n-1):\n diff=before-math.fabs(t-h[i+1]*0.006-a)\n if diff>0:\n before=math.fabs(t-h[i+1]*0.006-a)\n num=i+2\nprint(num)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s424437240', 's425263565', 's592958771', 's614545977', 's878481879', 's941239610', 's966288946', 's208299291'] | [2940.0, 3188.0, 2940.0, 3188.0, 2940.0, 2940.0, 3064.0, 3064.0] | [17.0, 20.0, 17.0, 20.0, 17.0, 17.0, 19.0, 18.0] | [157, 279, 221, 293, 263, 277, 272, 265] |
p03220 | u638282348 | 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 numpy import array, argmin\n\ninput()\ntemp_on_sea, oracle = map(int, input().rstrip("\\n").split())\nheights = list(map(int , input().rstrip("\\n").split()))\n\ntemp_diff = [temp_on_sea - height * 0.006 - oracle for height in heights]\n\nprint(array(temp_diff).argmin() + 1)\n', 'from numpy import array, argmin\n\ninput()\ntemp_on_sea, oracle = map(int, input().rstrip("\\n").split())\nheights = list(map(int , input().rstrip("\\n").split()))\n\ntemp_diff = [temp_on_sea - height * 0.006 for height in heights]\n\nprint(array(temp_diff).argmin() + 1)\n', 'from numpy import argmin\ninput()\nT, A = map(int, input().split())\nprint(argmin([abs(T - x * 0.006 - A) for x in map(int, input().split())]) + 1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s571282208', 's861268832', 's974019210'] | [21936.0, 21428.0, 12484.0] | [312.0, 359.0, 150.0] | [271, 262, 144] |
p03220 | u641406334 | 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 = float('inf')\nfor i in range(N):\n if T-H[i]*0.006 < temp:\n temp = T-H[i]*0.006\n ans = i\n \nprint(i+1)", "N = int(input())\nT, A = map(int,input().split())\nH = list(map(int,input().split()))\ntemp = float('inf')\nfor i in range(N):\n a = T-H[i]*0.006\n if abs(A-a) < temp:\n temp = abs(A-a)\n ans = i\n \nprint(ans+1)"] | ['Wrong Answer', 'Accepted'] | ['s598406854', 's536360324'] | [3060.0, 3060.0] | [19.0, 18.0] | [200, 213] |
p03220 | u641460756 | 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())\nta=list(input().split())\nT=int(ta[0])\nA=int(ta[1])\nHi=int(list(input().split()))\nprint(min(abs(A-t))for i in t=T-Hi[i]*0.006)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nd = 1000000000000\nans_count = 1\nfor i in range(n):\n ans = t - h[i] * 0.006\n if d > abs(a - ans):\n d = abs(a-ans)\n ans_count = i+1\nprint(ans_count)'] | ['Runtime Error', 'Accepted'] | ['s620282836', 's385651989'] | [2940.0, 3064.0] | [18.0, 18.0] | [140, 253] |
p03220 | u644516473 | 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()))\nd_degree = 100000j\nans = 0\nfor i in range(n):\n degree = t - h[i]*0.006\n if d_degree > abs(a - degree):\n d_degree = abs(a - degree)\n ans = i+1\nprint(ans)\n', 'n = int(input())\nt, a =map(int, input().split())\nh = list(map(int, input().split()))\nd_degree = 100000\nans = 0\nfor i in range(n):\n degree = t - h[i]*0.006\n if d_degree > abs(a - degree):\n d_degree = abs(a - degree)\n ans = i+1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s490659577', 's074535116'] | [3060.0, 3060.0] | [18.0, 18.0] | [258, 257] |
p03220 | u647213752 | 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 = map(int, input().split())\nT_cal = [abs(T - H * 0.006 - A) for H in Hs]\nprint(T_cal)\nprint(T_cal.index(min(T_cal))+1)', 'N = int(input())\nT, A = map(int, input().split())\nHs = map(int, input().split())\nT_cal = [abs(T - H * 0.006 - A) for H in Hs]\nprint(T_cal.index(min(T_cal))+1)'] | ['Wrong Answer', 'Accepted'] | ['s557642713', 's969335964'] | [3060.0, 3060.0] | [19.0, 18.0] | [171, 158] |
p03220 | u652081898 | 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(input().split()))\n\ncount = t\nresult = 0\n\nfor i in range(n):\n test = t - list[i]*0.006\n if test >= a:\n if test-a <= count:\n count = test - a\n result = i\n else:\n pass\n else:\n if a-test <= count:\n count = a - test\n result = i\n else:\n pass\n \nprint(result)', 'n = int(input())\nt, a = map(int, input().split())\nlist_original = list(map(int, input().split()))\n\nlist = []\n\nfor i in range(n):\n temperature = t - list_original[i]*0.006\n list.append(temperature)\n\npoint = list.index(min(list)) + 1\n\nprint(point)', 'n = int(input())\nt, a = map(int, input().split())\nlist_original = list(map(int, input().split()))\n\nlist = []\n\nfor i in range(n):\n temperature = abs(t - list_original[i]*0.006)\n list.append(temperature)\n\npoint = list.index(min(list)) + 1\n\nprint(point)\n', 'n = int(input())\nt, a = map(int, input().split())\nlist = list(map(int, input().split()))\n\ncount = t\nresult = 0\n\nfor i in range(n):\n test = t - list[i]*0.006\n if test >= a:\n if test-a <= count:\n count = test - a\n result = i+1\n else:\n pass\n else:\n if a-test <= count:\n count = a - test\n result = i+1\n else:\n pass\n \nprint(result', 'n = int(input())\nt, a = map(int, input().split())\nlist_original = list(map(int, input().split()))\n\nlist = []\n\nfor i in range(n):\n temperature = t - list_original[i]*0.006\n list.append(abs(a - temperature))\n\npoint = list.index(min(list)) + 1\n\nprint(point)\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s378685479', 's471308124', 's504655128', 's883489843', 's241918228'] | [3064.0, 3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 17.0, 18.0] | [429, 251, 257, 437, 261] |
p03220 | u652656291 | 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 = []\nfor i in range(n):\n temp.append(a-(t-H[i]*0.006))\ntemp_abs = [abs(j) for j in temp]\nprint(min(temp_abs))', 'n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\nminitemp = 10*100\nfor i in range(len(H)):\n H[i] = abs(t-H[i]*0.006)\n minitemp = min(minitemp,H[i])\nfor j in range(len(H)):\n if H[j] == minitemp:\n print(j+1)\n break\n\n', 'n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\ntemp = []\nfor i in range(n):\n temp.append(a-(t-H[i]*0.006))\nprint(min(abs(temp)))', 'n = int(input())\nt,a = map(int,input().split())\nH = list(map(int,input().split()))\nminitemp = 10*100\nfor i in range(len(H)):\n H[i] = abs(a-(t-H[i]*0.006))\n minitemp = min(minitemp,H[i])\nfor j in range(len(H)):\n if H[j] == minitemp:\n print(j+1)\n break\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s046212298', 's730843550', 's888391276', 's342812176'] | [3188.0, 3060.0, 3060.0, 3060.0] | [18.0, 19.0, 19.0, 18.0] | [198, 257, 165, 261] |
p03220 | u653485478 | 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 = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\nmint = a - (t - h[0] * 0.006)\n\nfor i in range(len(h)):\n T = t - h[i] * 0.006\n if abs(a - T) <= mint:\n min = i + 1\n\nprint(min)', 'n = int(input())\nt, a = list(map(int, input().split()))\nh = list(map(int, input().split()))\n\ntemp = 0.006\nmin_t = abs(a - (t - h[0] * temp))\nmin = 0\n\nfor i in range(n):\n tmp = abs(a - (t - h[i] * temp))\n if tmp < min_t:\n min_t = tmp\n min = i\n\nprint(min + 1)'] | ['Wrong Answer', 'Accepted'] | ['s021444152', 's825997032'] | [3060.0, 3064.0] | [18.0, 18.0] | [226, 277] |
p03220 | u661576386 | 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 = map(int, input().split())\nA = list(map(int, input().split()))\nprint(A)\ntem = 0\nst = 0\nst2 = 0\nfor i in range(a):\n tem = c-(b-A[i]*0.006)\n tem = abs(tem)\n if i == 0:\n st = tem\n else:\n if st < tem:\n st = st\n else:\n st = tem\n st2 = i\nprint(st2+1)\n', 'a = int(input())\nb, c = map(int, input().split())\nA = list(map(int, input().split()))\ntem = 0\nst = 0\nst2 = 0\nfor i in range(a):\n tem = c-(b-A[i]*0.006)\n tem = abs(tem)\n if i == 0:\n st = tem\n else:\n if st < tem:\n st = st\n else:\n st = tem\n st2 = i\nprint(st2+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s615870746', 's959312987'] | [3060.0, 3060.0] | [18.0, 18.0] | [334, 325] |
p03220 | u668268633 | 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 math\n\nif __name__ == '__main__':\n n = int(input())\n t, a = map(int, input().split())\n h = map(int, input().split())\n\n diff = 0\n answer = -1\n first = True\n\n for index, height in enumerate(h):\n temp = t - height * 0.006\n current_diff = math.fabs(a - temp)\n print(index, temp)\n\n if current_diff <= diff or first:\n diff = current_diff\n answer = index\n first = True\n\n print(answer)\n", "import math\n\nif __name__ == '__main__':\n n = int(input())\n t, a = map(int, input().split())\n h = map(int, input().split())\n\n diff = 0\n answer = -1\n first = True\n\n for index, height in enumerate(h):\n temp = t - height * 0.006\n current_diff = math.fabs(a - temp)\n \n\n if current_diff <= diff or first:\n diff = current_diff\n answer = index\n first = False\n\n print(answer+1)\n"] | ['Wrong Answer', 'Accepted'] | ['s569678861', 's851284248'] | [3316.0, 3060.0] | [20.0, 19.0] | [469, 487] |
p03220 | u668705838 | 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 = map(int, input().split())\nimport numpy as np\nprint(np.argmin([abs(a - (t - i*6e-3)) for i in h]))', 'n = int(input())\nt,a = map(int, input().split())\nh = map(int, input().split())\nimport numpy as np\nprint(np.argmin([abs(a - (t - i*6e-3)) for i in h])+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s314183090', 's484775221'] | [12544.0, 12536.0] | [150.0, 150.0] | [150, 153] |
p03220 | u669382434 | 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(H)\nno=0\nnoabs=100000.0\nfor i in range(N):\n NT=T-H[i]*0.006\n if noabs>=abs(NT-T):\n no=i+1\n noabs=abs(NT-T)\nprint(no)', 'N=int(input())\nT,A=map(int,input().split())\nH=list(map(int,input().split()))\nno=0\nnoabs=100000.0\nfor i in range(N):\n NT=T-H[i]*0.006\n if noabs>=abs(NT-A):\n no=i+1\n noabs=abs(NT-A)\nprint(no)'] | ['Wrong Answer', 'Accepted'] | ['s930500261', 's359036704'] | [3064.0, 3064.0] | [18.0, 18.0] | [218, 209] |
p03220 | u670567845 | 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 bisect\nN = int(input())\nT, A = map(int, input().split())\nH = [0]*N\nH = list(map(int, input().split()))\n\nTL = [0]*N\nfor i in range(N):\n TL[i] = T - H[i]*0.006\n\nTLsort = sorted(TL)\nidx = bisect.bisect_left(TLsort, A)\nansVal = 0\nif idx == N:\n ansVal = TLsort[idx-1]\nelse:\n L = A - TLsort[idx-1]\n R = TLsort[idx] - A\n if L > R:\n ansVal = TLsort[idx-1]\n else:\n ansVal = TLsort[idx]\n\nans = TL.index(ansVal) + 1\nprint(ans)', 'import bisect\nN = int(input())\nT, A = map(int, input().split())\nH = [0]*N\nH = list(map(int, input().split()))\n\nTL = [0]*N\nfor i in range(N):\n TL[i] = abs(T - H[i]*0.006 - A)\n\nansVal = min(TL)\nans = TL.index(ansVal) + 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s720352338', 's823690163'] | [3064.0, 3064.0] | [19.0, 18.0] | [454, 232] |
p03220 | u671787293 | 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\ndef main():\n ttt = []\n n = int(input())\n e = [[int(i) for i in input().split()] for i in range(int(input()))]\n #n = 3\n #e = [[21,-11],[81234,94124,52141]]\n for i in range(n):\n t = e[0][0] - e[1][i]*0.006\n tt = abs(e[0][1] - t)\n ttt.append(tt)\n ttt = np.array(ttt)\n print(np.argmin(ttt)+1)\nmain()', 'import numpy as np\ndef main():\n ttt = []\n n = int(input())\n e = [[int(i) for i in input().split()] for i in range(int(input()))]\n for i in range(n):\n t = e[0][0] - e[1][i]*0.006\n \ttt = abs(e[0][1] - t)\n ttt.append(tt)\n print(np.argmin(ttt)+1)\n ', 'import numpy as np\ndef main():\n \n n = int(input())\n e = [list(map(int, input().split())) for _ in range(n)]\n \n #n = 3\n #e = [[21,-11],[81234,94124,52141]]\n for j in range(n):\n t = e[0][0] - e[1][j]*0.006\n tt = abs(e[0][1] - t)\n ttt.append(tt)\n ttt = np.array(ttt)\n print(np.argmin(ttt)+1)\nttt = []\nmain()\n', 'import numpy as np\ndef main():\n\n n = int(input())\n N, M = map(int, input().split())\n e = list(map(int, input().split()))\n \n #n = 3\n #e = [[21,-11],[81234,94124,52141\n for j in range(n):\n t = N - e[j]*0.006\n tt = abs(M - t)\n ttt.append(tt)\n ttt = np.array(ttt)\n print(np.argmin(ttt)+1)\nmain()', 'import numpy as np\ndef main():\n ttt = []\n n = int(input())\n e = [[int(i) for i in input().split()] for i in range(int(input()))]\n for i in range(n):\n t = e[0][0] - e[1][i]*0.006\n tt = abs(e[0][1] - t)\n ttt.append(tt)\n ttt = np.array(ttt)\n print(np.argmin(ttt)+1)\nmain()', 'import numpy as np\ndef main():\n ttt = []\n n = int(input())\n e = [[int(i) for i in input().split()] for i in range(int(input()))]\n for i in range(n):\n t = e[0][0] - e[1][i]*0.006\n \ttt = abs(e[0][1] - t)\n ttt.append(tt)\n print(np.argmin(ttt)+1)\nmain()', 'import numpy as np\ndef main():\n ttt = []\n n = int(input())\n N, M = map(int, input().split())\n e = list(map(int, input().split()))\n \n #n = 3\n #e = [[21,-11],[81234,94124,52141\n for j in range(n):\n t = N - e[j]*0.006\n tt = abs(M - t)\n ttt.append(tt)\n ttt = np.array(ttt)\n print(np.argmin(ttt)+1)\nmain()'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s424605795', 's648836284', 's793912640', 's856230827', 's905497738', 's936598712', 's094688125'] | [12420.0, 2940.0, 12504.0, 12484.0, 21312.0, 2940.0, 12952.0] | [149.0, 17.0, 150.0, 149.0, 982.0, 17.0, 157.0] | [359, 256, 431, 408, 284, 260, 420] |
p03220 | u672494157 | 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\nfrom collections import deque\n\nsys.setrecursionlimit(4100000)\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n N = int(inputs[0])\n [T, A] = string_to_int(inputs[1])\n H = string_to_int(inputs[2])\n\n min_diff = -1\n min_diff_i = -1\n for i, h in enumerate(H):\n t = T - h * 0.006\n diff = abs(A-t)\n if min_diff == -1 or diff < min_diff:\n min_diff = diff\n min_diff_i = i\n return min_diff_i\n\n\ndef string_to_int(string):\n return list(map(int, string.split()))\n\n\nif __name__ == "__main__":\n ret = solve(inputs(1))\n print(ret)\n', 'import sys\nfrom collections import deque\n\nsys.setrecursionlimit(4100000)\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n N = int(inputs[0])\n [T, A] = string_to_int(inputs[1])\n H = string_to_int(inputs[2])\n\n min_diff = -1\n min_diff_i = -1\n for i, h in enumerate(H):\n t = T - h * 0.006\n diff = abs(A-t)\n if min_diff == -1 or diff < min_diff:\n min_diff = diff\n min_diff_i = i\n return min_diff_i + 1\n\n\ndef string_to_int(string):\n return list(map(int, string.split()))\n\n\nif __name__ == "__main__":\n ret = solve(inputs(3))\n print(ret)\n'] | ['Runtime Error', 'Accepted'] | ['s624024361', 's530242812'] | [3316.0, 3564.0] | [21.0, 23.0] | [664, 668] |
p03220 | u676496404 | 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 = [abs(a-(t-b*0.006)) for b in h]\nprint(x.index(min(x)+1))', 'n=int(input())\nt,a=map(int,input().split())\nh = list(map(int, input().split()))\nx = [abs(a-(t-b*0.006)) for b in h]\nprint(x.index(min(x)))', 'n=int(input())\nt,a=map(int,input().split())\nh = list(map(int, input().split()))\nx = [abs(a-(t-b*0.006)) for b in h]\nprint(x.index(min(x))+1)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s238251956', 's989916419', 's766051330'] | [3060.0, 3060.0, 3060.0] | [20.0, 19.0, 18.0] | [140, 138, 140] |
p03220 | u692422364 | 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 = map(int,input().split())\n\nh = list(map(int,input().split()))\n\nprint(n,t,a,h)\nt_2 = (t-a)/0.006\n\nres = -1000\n\nfor m in range(n):\n num_ = abs(t_2 - h[m])\n if m == 0:\n res = num_\n res_2 = m + 1\n elif res > num_:\n res_2 = m + 1\nprint(res_2)', 'n = int(input())\n\nt,a = map(int,input().split())\n\nh = list(map(int,input().split()))\n\nt_2 = (t-a)/0.006\nprint(t_2)\nres = 1000000\n\nfor m in range(n):\n num_ = abs(t_2 - h[m])\n if res > num_:\n res = num_\n res_2 = m + 1\nprint(res_2)', 'n = int(input())\n\nt,a = map(int,input().split())\n\nh = list(map(int,input().split()))\n\nt_2 = (t-a)/0.006\nprint(t_2)\nres = 1000\n\nfor m in range(n):\n num_ = abs(t_2 - h[m])\n if m == 0:\n res = num_\n res_2 = m + 1\n elif res > num_:\n res = num_\n res_2 = m + 1\nprint(int(res_2))', 'n = int(input())\n\nt,a = map(int,input().split())\n\nh = list(map(int,input().split()))\n\nt_2 = (t-a)/0.006\nres = 1000000\n\nfor m in range(n):\n num_ = abs(t_2 - h[m])\n if res > num_:\n res = num_\n res_2 = m + 1\nprint(res_2)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s202705792', 's380792481', 's866971932', 's099511556'] | [3064.0, 3064.0, 3064.0, 3060.0] | [18.0, 18.0, 18.0, 18.0] | [272, 236, 286, 225] |
p03220 | u698916859 | 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()]\ntemp = []\n\nfor i in H:\n temp.append(abs(A - (T - i * 0.006)))\nmin_ind = temp.index(min(temp))\nprint(min_ind)', 'N = int(input())\nT, A = map(int, input().split())\nH = [int(i) for i in input().split()]\ntemp = []\n\nfor i in H:\n temp.append(abs(A - (T - i * 0.006)))\nmin_ind = temp.index(min(temp))\nprint(min_ind+1)'] | ['Wrong Answer', 'Accepted'] | ['s663809439', 's659404832'] | [9152.0, 9172.0] | [29.0, 33.0] | [199, 201] |
p03220 | u703890795 | 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()))\nt = 999 \np = 0 \nfor i in range(H):\n if t > abs(A - T - H[i]*0.006):\n t = abs(A - T - H[i]*0.006)\n p = i+1\nprint(p)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nt = 999 \np = 0 \nfor i in range(len(H)):\n if t > abs(A - T + H[i]*0.006):\n t = abs(A - T + H[i]*0.006)\n p = i+1\nprint(p)'] | ['Runtime Error', 'Accepted'] | ['s035128501', 's572887287'] | [3060.0, 3060.0] | [17.0, 17.0] | [279, 284] |
p03220 | u711295009 | 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())\nlistH = list(map(int, input().split()))\n\nnearA=10000000\nnumber=0\nindex=0\nwhile index < len(listH):\n h = listH[index]\n if index ==0:\n nearA = max(t-h*0.0006, a)-min(t-h*0.006, a)\n number = index+1\n elif max(t-h*0.006, a)-min(t-h*0.006, a)< nearA:\n nearA = max(t-h*0.006, a)-min(t-h*0.006, a)\n number = index+1\n index+=1\n\nprint(number)', 'n = int(input())\nt, a = map(int, input().split())\nlistH = list(map(int, input().split()))\n\nnearA=10000000\nnumber=0\nindex=0\nwhile index < len(listH):\n h = listH[index]\n if index ==0:\n nearA = max(t-h*0.006, a)-min(t-h*0.006, a)\n number = index+1\n elif max(t-h*0.006, a)-min(t-h*0.006, a)< nearA:\n nearA = max(t-h*0.006, a)-min(t-h*0.006, a)\n number = index+1\n index+=1\n\nprint(number)\n \n'] | ['Wrong Answer', 'Accepted'] | ['s884742224', 's719458088'] | [3064.0, 3064.0] | [19.0, 19.0] | [423, 428] |
p03220 | u721316601 | 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 = np.array(list(map(int, input().split())))\n\nnum = np.abs(A - (T - H * 0.006))\nprint(np.argmin(num) + 1)\n', 'import numpy as np\n\nN = int(input())\nT, A = list(map(int, input().split()))\nH = np.array(list(map(int, input().split())))\n\nnum = np.abs(A - (T - H * 0.006))\nprint(np.argmin(num) + 1)\n'] | ['Runtime Error', 'Accepted'] | ['s614183640', 's562468921'] | [3060.0, 12396.0] | [18.0, 154.0] | [163, 183] |
p03220 | u723583932 | 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. | ['#113 b-palce\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nmini=10**6\nans=0\nfor i in range(len(h)):\n kion=t-0.006*h[i]\n sa=abs(a-kion)\n print(i,sa)\n if sa<mini:\n mini=sa\n ans=i+1\nprint(ans)', '#113 b-palce\nn=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nmini=10**6\nans=0\nfor i in range(len(h)):\n kion=t-0.006*h[i]\n sa=abs(a-kion)\n if sa<mini:\n mini=sa\n ans=i+1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s352030613', 's156967603'] | [3316.0, 3060.0] | [20.0, 18.0] | [246, 230] |
p03220 | u724742135 | 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 stdin\nn = int(stdin.readline().rstrip())\nt, a = [int(x) for x in stdin.readline().rstrip().split()]\nhs = [int(x) for x in stdin.readline().rstrip().split()]\nanswers=[t-h*0.006 for h in hs]\nansers=[abs(an-a)for an in answers]\nprint(min(answers))', 'from sys import stdin\nn = int(stdin.readline().rstrip())\nt, a = [int(x) for x in stdin.readline().rstrip().split()]\nhs = [int(x) for x in stdin.readline().rstrip().split()]\nanswers=[t-h*0.006 for h in hs]\nanswers=[abs(an-a)for an in answers]\nprint(min(answers))', 'from sys import stdin\nn = int(stdin.readline().rstrip())\nt, a = [int(x) for x in stdin.readline().rstrip().split()]\nhs = [int(x) for x in stdin.readline().rstrip().split()]\n\nanswers=[t-h*0.006 for h in hs]\n\nanswers=[abs(an-a) for an in answers]\n\nprint(answers.index(min(answers))+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s441706563', 's701541537', 's104289669'] | [3188.0, 3060.0, 3060.0] | [19.0, 18.0, 18.0] | [260, 261, 282] |
p03220 | u728498511 | 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())\nhs = list(map(int, input().split()))\narr = []\n\nfor h in hs:\n arr.append(abs(t - h * 0.006 - a))\nprint(arr.index(min(arr))+2)', 'input()\nt, a = map(int, input().split())\nhs = list(map(int, input().split()))\narr = []\n\nfor h in hs:\n arr.append(abs(t - h * 0.006 - a))\nprint(arr.index(min(arr))+1)'] | ['Wrong Answer', 'Accepted'] | ['s629916346', 's036105479'] | [3060.0, 3060.0] | [18.0, 18.0] | [168, 168] |
p03220 | u728774856 | 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. | ['option = int(input())\nref_t, tmp_id = int(input().split())\nheight = (int(n) for n in input().split())\n\nave_t = []\nfor i in range(option):\n ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))\n\nprint(ave_t.index(min(ave_t)) + 1)', 'option = int(input())\nref_t, tmp_id = int(input().split())\nheight = (int(n) for n in input().split())\n\nave_t = []\nfor i in range(option):\n ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))\n\nprint(ave_t.index(min(ave_t)) + 1)', 'option = int(input())\nref_t, tmp_id = int(input().split())\nheight = list((int(n) for n in input().split()))\n\nave_t = []\nfor i in range(option):\n ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))\n\nprint(ave_t.index(min(ave_t)) + 1)', 'option = int(input())\nref_t, tmp_id = (int(n) for n in input().split())\nheight = list((int(n) for n in input().split()))\n\nave_t = []\nfor i in range(option):\n ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.006)))\n\nprint(ave_t.index(min(ave_t)) + 1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s073666971', 's526727257', 's780065076', 's464256334'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 19.0] | [230, 230, 236, 250] |
p03220 | u729133443 | 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,*h=map(int,open(0).read().spilt())\nd,i=10**18,0\nfor j in range(n):\n if abs(a-t+h*0.006)<d:\n d=abs(a-t+h*0.006)\n i=j\nprint(i+1)', 'n,t,a,*h=map(int,open(0).read().spilt())\nd,i=10**18,0\nfor j in range(n):\n if abs(a-t+h[j]*0.006)<d:\n d=abs(a-t+h[j]*0.006)\n i=j\nprint(i+1)', '_,t,a,*h=map(int,open(0).read().split());m=[abs(t-6e-3*x-a)for x in h];print(m.index(min(m))+1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s095812257', 's828463466', 's535280945'] | [3188.0, 3060.0, 3060.0] | [19.0, 17.0, 18.0] | [139, 145, 95] |
p03220 | u730476362 | 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(x) for x in input().split())\nH = [int(x) for x in input().split()]\nprint(H)\n\n\ndef calcTemp(x, y):\n return x - y * 0.006\n\n\nmin = 1000000\ncounter = 1\nnumPlace=0\nfor height in H:\n tmp = abs(A - calcTemp(T, height))\n if min > tmp:\n min = tmp\n numPlace = counter\n counter += 1\nprint(numPlace)', 'N = int(input())\nT, A = (int(x) for x in input().split())\nH = [int(x) for x in input().split()]\n\n\ndef calcTemp(x, y):\n return x - y * 0.006\n\n\nmin = 1000000\ncounter = 1\nnumPlace=0\nfor height in H:\n tmp = abs(A - calcTemp(T, height))\n if min > tmp:\n min = tmp\n numPlace = counter\n counter += 1\nprint(numPlace)\n'] | ['Wrong Answer', 'Accepted'] | ['s125670450', 's487587487'] | [3064.0, 3188.0] | [18.0, 19.0] | [342, 334] |
p03220 | u731368968 | 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()))\ndist = 10000\nans = 0\nfor i in range(n):\n if dist > abs(A - (T - h[i] * 0.006)):\n dist = abs(A - (T - h[i] * 0.006))\n ans = i\n print(abs(A - (T - h[i] * 0.006)))\nprint(ans + 1)', 'n = int(input())\nT, A = map(int, input().split())\nh = list(map(int, input().split()))\ndist = 10000\nans = 0\nfor i in range(n):\n if dist > abs(A - (T - h[i] * 0.006)):\n dist = abs(A - (T - h[i] * 0.006))\n ans = i\nprint(ans + 1)'] | ['Wrong Answer', 'Accepted'] | ['s497393569', 's831602287'] | [3064.0, 3064.0] | [18.0, 18.0] | [285, 242] |
p03220 | u732870425 | 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\nli = []\nfor i in range(len(h)):\n li.append(abs(a - t - h[i]*0.006))\n \nprint(li.index(min(li)))', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nli = []\nfor i in range(len(h)):\n li.append(int(t - h[i]*0.006))\n \nprint(index(min(li)))', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nli = []\nfor i in range(len(h)):\n li.append(t - h[i]*0.006)\n \nprint(index(min(li)))', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nli = []\nfor i in range(len(h)):\n li.append(abs(a - (t - h[i]*0.006)))\n \nprint(li.index(min(li)))', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nli = []\nfor i in range(n):\n li.append(abs(a - (t - h[i]*0.006)))\n \nprint(li.index(min(li))+1)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s053672193', 's270447775', 's780877926', 's883257590', 's087686658'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 19.0, 18.0, 18.0, 18.0] | [183, 176, 171, 185, 182] |
p03220 | u733738237 | 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 =list(map(int,input().split()))\nval =10000\nsite=0\nfor i in range(N):\n\tif abs(A-T+0.006*height_list[i])<=val:\n\t\tval = abs(T-0.006*height_list[i])\n\t\tsite = i\nprint(site+1)', 'N=int(input())\nT,A=map(int,input().split())\nheight_list =list(map(int,input().split()))\nval =10000\nsite=0\nfor i in range(N):\n\tif abs(A-T+0.006*height_list[i])<val:\n\t\tval = abs(T-0.006*height_list[i])\n\t\tsite = i\nprint(site+1)', 'N = int(input())\nT,A=map(int,input().split())\nh_list =list(map(int,input().split()))\ndif_list = [abs(A-(T-x*0.006)) for x in h_list]\nmn =min(dif_list)\nfor i in range(N):\n\tif mn == dif_list[i]:\n\t\tbreak\nprint(i+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s130402643', 's809264186', 's891621395'] | [3064.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [225, 224, 211] |
p03220 | u734876600 | 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())\nli = list(map(int,input().split()))\np = []\nfor i in range(len(li)):\n m = abs(t - 0.006 * li[i])\n p.append(m)\n\nprint((p.index(min(p)) + 1))', 'n = int(input())\nt,a = map(int,input().split())\nli = list(map(int,input().split()))\np = []\nfor i in range(len(li)):\n m = t - 0.006 * li[i]\n p.append(m)\nprint((t-min(p)) // 0.006)', 'n = int(input())\nt,a = map(int,input().split())\nli = list(map(int,input().split()))\np = []\nfor i in range(len(li)):\n m = t - 0.006 * li[i]\n p.append(m)\nprint(int((t-min(p)) / 0.006))', 'n = int(input())\nt,a = map(int,input().split())\nli = list(map(int,input().split()))\np = []\nfor i in range(len(li)):\n m = abs(a-(t - 0.006 * li[i]))\n p.append(m)\n\nprint((p.index(min(p)) + 1))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s166357604', 's352999542', 's592080713', 's649748364'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 19.0] | [192, 184, 188, 196] |
p03220 | u735211927 | 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 = [A -(T - int(x)*0.006) for x in input().split()]\nh = map(abs, H)\nprint(h.index(min(h))+1)', 'N = int(input())\nT,A = map(int,input().split())\nH = [A -(T - int(x)*0.006) for x in input().split()]\nh = map(abs, H)\nprint(h.index(min(h))+1)', 'N = int(input())\nT,A = map(int,input().split())\nH = [(A -T + int(x)*0.006) for x in input().split()]\nh = map(abs, H)\nprint(h.index(min(h))+1)', 'N = int(input())\nT,A = map(int,input().split())\nH = [A -(T - int(x)*0.006) for x in input().split()]\nh = [abs(i) for i in H]\nprint(h.index(min(h))+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s250878266', 's525517498', 's736863403', 's978724778'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 18.0] | [141, 141, 141, 149] |
p03220 | u735906430 | 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(x) for x in input().split(" ")]\nH_list = [int(x) for x in input().split(" ")]\n\nave_list = [T - (H * 0.006) for H in H_list]\n\nres_point = 0\nres_ave = 99999\n\nprint(ave_list)\nfor enu, ave in enumerate(ave_list):\n if abs(res_ave - A) > abs(ave - A):\n res_ave = ave\n res_point = enu + 1\nprint(res_point)\n', 'import numpy as np\n\nN = int(input())\nT, A = [int(x) for x in input().split(" ")]\nH_list = np.array([int(x) for x in input().split(" ")])\n\nave_list = T - (H_list * 0.006)\n\nres_point = 0\nres_ave = 99999\n\nprint(ave_list)\nfor enu, ave in enumerate(ave_list):\n if abs(res_ave - A) > abs(ave - A):\n res_ave = ave\n res_point = enu + 1\nprint(res_point)\n', 'N = int(input())\nT, A = [int(x) for x in input().split(" ")]\nH_list = [int(x) for x in input().split(" ")]\n\nave_list = [T - (H * 0.006) for H in H_list]\n\nres_point = 0\nres_ave = 99999\n\nfor enu, ave in enumerate(ave_list):\n if abs(res_ave - A) > abs(ave - A):\n res_ave = ave\n res_point = enu + 1\nprint(res_point)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s827925174', 's917929557', 's479181247'] | [3060.0, 21564.0, 3060.0] | [19.0, 1091.0, 18.0] | [345, 362, 329] |
p03220 | u739360929 | 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 N = int(input())\n T, A = map(int, input().split())\n H = map(int, input().split())\n ans = float('inf')\n ans_i = 0\n for i, v in enumerate(H):\n tmp = abs(A - (T - 0.006 * v))\n print(A, T, v, T-v*0.006)\n if ans > tmp:\n ans_i = i\n ans = tmp\n print(ans_i+1)\n\nif __name__ == '__main__':\n solve()\n", "def solve():\n n = int(input())\n t, a = map(int, input().split())\n h = list(map(int, input().split()))\n c = 10000\n ci = 0\n for i, x in enumerate(h):\n tmp = abs(a - (t - x * 0.006))\n if c > tmp:\n c = tmp\n ci = i\n print(ci + 1)\n\nif __name__ == '__main__':\n solve()\n"] | ['Wrong Answer', 'Accepted'] | ['s987710092', 's476468072'] | [3392.0, 9208.0] | [21.0, 30.0] | [370, 322] |
p03220 | u740767776 | 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(lambda x: abs(a - (t - int(x) * 0.006)),input().split()))\nprint(array)\ncnt = 0\nMin = 9999\nfor i in range(n):\n if Min > array[i]:\n Min = array[i]\n cnt = i + 1\nprint(cnt)', 'n = int(input())\nt, a = map(int,input().split())\narray = list(map(lambda x: abs(a - (t - int(x) * 0.006)),input().split()))\ncnt = 0\nMin = 9999\nfor i in range(n):\n if Min > array[i]:\n Min = array[i]\n cnt = i + 1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s440882018', 's741919956'] | [3064.0, 3064.0] | [19.0, 21.0] | [251, 238] |
p03220 | u743164083 | 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())\nTemp, A = list(map(int, input().split()))\nH = list(map(float, input().split()))\nk = 0\ntarget = float("inf")\nn = []\nfor i, v in enumerate(H, start=1):\n k = Temp - v * float(0.006)\n if target > abs(k - A):\n target == abs(k - A)\n n.append(i)\n\nprint(n[-1])\n', 'N = int(input())\nTemp, A = list(map(int, input().split()))\nH = list(map(float, input().split()))\nk = 0\ntarget = float("inf")\nn = []\nfor i, v in enumerate(H, start=1):\n k = Temp - v * float(0.006)\n if target > abs(k - A):\n target = abs(k - A)\n n.append(i)\n\nprint(n[-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s057850114', 's605266401'] | [3060.0, 3060.0] | [18.0, 17.0] | [290, 289] |
p03220 | u744034042 | 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())\nh = list(map(float, input().split()))\nimport numpy as np\nfor i in range(n):\n h[i] = abs( a - (t - h[i] * 0.006))\nprint(np.armmin(h) + 1)', 'n = int(input())\nt, a = map(float, input().split())\nh = list(map(float, input().split()))\nimport numpy as np\nfor i in range(n):\n h[i] = abs( a - (t - h[i] * (-0.006)))\nprint(np.armmin(h) + 1)', 'n = input()\nt, a = map(float, input().split())\nh = list(map(float, input().split()))\nfor i in range(n):\n h[i] = abs( a - (t - h[i] * (-0.006)))\nprint(min(h))', 'n = int(input())\nt, a = map(float, input().split())\nh = list(map(float, input().split()))\nimport numpy as np\nfor i in range(n):\n h[i] = abs( a - (t - h[i] * 0.006))\nprint(np.armmin(h) + 1)', 'import numpy as np\nn = int(input())\nt, a = map(float, input().split())\nh = list(map(float, input().split()))\nfor i in range(n):\n h[i] = abs( a - (t - h[i] * 0.006))\nprint(np.argmin(h)+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s325639312', 's525958362', 's688514805', 's835940662', 's643393846'] | [12524.0, 19048.0, 3060.0, 12532.0, 18368.0] | [152.0, 265.0, 17.0, 149.0, 265.0] | [189, 192, 158, 189, 189] |
p03220 | u747873993 | 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=(int(i) for i in input().split())\nH=[int(i) for i in input().split()]\nH=np.array([1000,2000])\nT=np.array([T for i in range(N)])\nprint(abs(A-(T-H*0.006)).argmin())', 'import numpy as np\nN=int(input())\nT,A=(int(i) for i in input().split())\nH=np.array([int(i) for i in input().split()])\nT=np.array([T for i in range(N)])\nprint(abs(A-(T-H*0.006)).argmin()+1)'] | ['Runtime Error', 'Accepted'] | ['s573464176', 's385468308'] | [12508.0, 12508.0] | [150.0, 148.0] | [200, 188] |
p03220 | u748311048 | 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\nB=abs(A)*9999999\nX=0\nfor i in range(N):\n if B>abs((T-H[i]*0.006)-A):\n X=i+1\n B=min(abs((T-H[i]*0.006)-A),B)\n print(B)\n\nprint(X)', 'N=int(input())\nT,A=map(int,input().split())\nH=list(map(int, input().split()))\n\nB=999999999999999\nX=0\nfor i in range(N):\n if B>abs((T-H[i]*0.006)-A):\n X=i+1\n B=min(abs((T-H[i]*0.006)-A),B)\n\nprint(X)'] | ['Wrong Answer', 'Accepted'] | ['s088759987', 's184872862'] | [3188.0, 3060.0] | [19.0, 18.0] | [214, 204] |
p03220 | u757030836 | 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(intinput().split()))\n\ndt = 10**9\nnum = 0\nfor i in range(n):\n ti = t = hl[i]*0.006\n if abs(a - ti) <= dt:\n dt = abs(a -ti)\n num = i\n \n \nprint(num + 1)', 'n = int(input())\nt, a = map(int, input().split())\nhl = list(map(int, input().split()))\n\ndt = 10**9\nnum = 0\nfor i in range(n):\n ti = t - hl[i] * 0.006\n if abs(a - ti) <= dt:\n dt = abs(a - ti)\n num = i\n\nprint(num + 1)\n'] | ['Runtime Error', 'Accepted'] | ['s434551483', 's912286460'] | [3064.0, 3060.0] | [17.0, 19.0] | [226, 236] |
p03220 | u762557532 | 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 stdin\nimport numpy as np\nfrom copy import deepcopy\n\nN = input()\nT, A = list(map(int,input().split()))\nH = list(map(int,input().split()))\n\nvar = float('inf')\nidx = 1\nfor i in range(len(H)):\n if (abs(T-A-0.0006*H[i]) < var):\n var = abs(T-A-0.0006*H[i])\n idx = i\n \nprint(int(idx+1))", "from sys import stdin\nimport numpy as np\nfrom copy import deepcopy\n\nN = input()\nT, A = list(map(int,input().split()))\nH = list(map(int,input().split()))\n\n\nvar = float('inf')\nidx = 1\nfor i in range(len(H)):\n if (abs(T-A-0.006*H[i]) < var):\n var = abs(T-A-0.006*H[i])\n idx = i\n \nprint(int(idx+1))"] | ['Wrong Answer', 'Accepted'] | ['s837232885', 's999339152'] | [12508.0, 14428.0] | [149.0, 149.0] | [305, 304] |
p03220 | u764956288 | 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_H = list(map(int, input().split()))\n\nls = [abs(A-(T-x*6/1000)) for x in list_H]\nprint(ls.index(min(ls)))', 'ls = [abs(A-(T-x*6/1000)) for x in list_H]\nls.index(min(ls)+1)', 'N = int(input())\nT,A = map(int, input().split())\nlist_H = list(map(int, input().split()))\n\nls = [abs(A-(T-x*6/1000)) for x in list_H]\nprint(ls.index(min(ls))+1)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s530507186', 's837714840', 's061334470'] | [3060.0, 2940.0, 3060.0] | [18.0, 18.0, 18.0] | [158, 62, 161] |
p03220 | u766566560 | 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()))\nlist = [] * N\n\nfor i in range(N):\n\tlist.append(abs(T - H[i] * 0.0006 - A))\n\nprint(list.index(min(list)) + 1)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nlist = [] * N\n\nfor i in range(N):\n\tlist.append(abs(T - H[i] * 0.0006 - A))\n\nprint(list)\nprint(list.index(min(list)) + 1)', 'N = int(input())\nT, A = map(int, input().split())\nH = list(map(int, input().split()))\nlist = [] * N\n\nfor i in range(N):\n\tlist.append(abs(T - H[i] * 0.006 - A))\n\nprint(list.index(min(list)) + 1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s857093403', 's983946060', 's082340864'] | [3444.0, 3064.0, 3060.0] | [21.0, 19.0, 18.0] | [194, 206, 193] |
p03220 | u768896740 | 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 = 10000000\nindex = 0\n\nfor i in range(n):\n temp_diff = abs(t - 0.006 * h[i] -a)\n if temp_diff <= diff:\n index = i+1\n\nprint(index)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\n\nindex = 1\ndiff = []\n\nif n == 1:\n print(n)\n exit()\n\ndiff.append(abs(t - 0.006 * h[0] - a))\n\nfor i in range(1, n):\n diff.append(abs(t - 0.006 * h[i] -a))\n if diff[i] <= diff[index]:\n index = i\n\nprint(index+1)', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\nnum = 0\nmin_temp = 10000000\nfor i in range(n):\n temp = t - (0.006*h[i])\n temp_diff = abs(a - temp)\n if temp_diff < min_temp:\n min_temp = temp_diff\n num = i\n\nprint(num+1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s438655874', 's736533508', 's583525278'] | [3060.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [232, 312, 278] |
p03220 | u771532493 | 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())\nTemp=[T-0.006*int(input()) for i in range(N)]\ndif=[abs(A-Temp[j]) for j in range (N)]\nprint(dif.index(min(dif))+1)\n', 'N=int(input())\nT,A=(int(i) for i in input().split())\nHlist=[int(i) for i in input().split()]\nTemp=[T-0.006*Hlist[i] for i in range(N)]\ndif=[abs(A-Temp[j]) for j in range (N)]\nprint(dif.index(min(dif))+1)'] | ['Runtime Error', 'Accepted'] | ['s501603885', 's708133941'] | [3060.0, 3060.0] | [18.0, 19.0] | [168, 203] |
p03220 | u774160580 | 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()]\nH_t = [T - 0.006 * h for h in H]\nprint(H_t)\nmin_dif = abs(H_t[0] - A)\nans = 0\nfor i in range(1, len(H_t)):\n if abs(H_t[i] - A) < min_dif:\n min_dif = abs(H_t[i] - A)\n ans = i\nprint(ans + 1)\n', 'N = int(input())\nT, A = map(int, input().split())\nH = [int(i) for i in input().split()]\nH_t = [T - 0.006 * h for h in H]\nmin_dif = abs(H_t[0] - A)\nans = 0\nfor i in range(1, len(H_t)):\n if abs(H_t[i] - A) < min_dif:\n min_dif = abs(H_t[i] - A)\n ans = i\nprint(ans + 1)\n'] | ['Wrong Answer', 'Accepted'] | ['s125255766', 's272473154'] | [3064.0, 3064.0] | [19.0, 18.0] | [294, 283] |
p03220 | u777394984 | 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())\nN = map(int, input().split())\ni = 9999\nj = 1\nfor ids,k in enumerate(N):\n if abs(A - (T - k * 0.006)) < i : \n i = abs(A - (T - k * 0.006))\n j = ids\n\nprint(j) ', 'B = int(input())\nT, A = map(int, input().split())\nN = map(int, input().split())\ni = 9999\nj = 1\nfor ids,k in enumerate(N):\n if abs(A - (T - k * 0.006)) < i : \n i = abs(A - (T - k * 0.006))\n j = ids\n\nprint(j + 1)'] | ['Wrong Answer', 'Accepted'] | ['s599234312', 's624136229'] | [3060.0, 3064.0] | [18.0, 18.0] | [217, 217] |
p03220 | u780698286 | 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()))\nl = []\nfor i in range(n):\n l.append(abs(a-(t-x*6/1000)))\nprint(l.index(min(l))+1)\n', 'n = int(input())\nt, a = map(int, input().split())\nh = list(map(int, input().split()))\nl = []\nfor i in range(n):\n l.append(abs(a-(t-h[i]*6/1000)))\nprint(l.index(min(l))+1)'] | ['Runtime Error', 'Accepted'] | ['s961979376', 's803012410'] | [9156.0, 9188.0] | [22.0, 25.0] | [169, 171] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.