TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())
H = [A -(T - int(x)*0.006) for x in input().split()]
h = map(abs, H)
print(h.index(min(h))+1)

N = int(input())
T,A = map(int,input().split())
H = [A -(T - int(x)*0.006) for x in input().split()]
h = map(abs, H)
print(h.index(min(h))+1)

N = int(input())
T,A = map(int,input().split())
H = [(A -T + int(x)*0.006) for x in input().split()]
h = map(abs, H)
print(h.index(min(h))+1)

N = int(input())
T,A = map(int,input().split())
H = [A -(T - int(x)*0.006) for x in input().split()]
h = [abs(i) for i in H]
print(h.index(min(h))+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = [int(x) for x in input().split(" ")]
H_list = [int(x) for x in input().split(" ")]

ave_list = [T - (H * 0.006) for H in H_list]

res_point = 0
res_ave = 99999

print(ave_list)
for enu, ave in enumerate(ave_list):
    if abs(res_ave - A) > abs(ave - A):
        res_ave = ave
        res_point = enu + 1
print(res_point)


import numpy as np

N = int(input())
T, A = [int(x) for x in input().split(" ")]
H_list = np.array([int(x) for x in input().split(" ")])

ave_list = T - (H_list * 0.006)

res_point = 0
res_ave = 99999

print(ave_list)
for enu, ave in enumerate(ave_list):
    if abs(res_ave - A) > abs(ave - A):
        res_ave = ave
        res_point = enu + 1
print(res_point)


N = int(input())
T, A = [int(x) for x in input().split(" ")]
H_list = [int(x) for x in input().split(" ")]

ave_list = [T - (H * 0.006) for H in H_list]

res_point = 0
res_ave = 99999

for enu, ave in enumerate(ave_list):
    if abs(res_ave - A) > abs(ave - A):
        res_ave = ave
        res_point = enu + 1
print(res_point)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def solve():
    N = int(input())
    T, A = map(int, input().split())
    H = map(int, input().split())
    ans = float('inf')
    ans_i = 0
    for i, v in enumerate(H):
        tmp = abs(A - (T - 0.006 * v))
        print(A, T, v, T-v*0.006)
        if ans > tmp:
            ans_i = i
            ans = tmp
    print(ans_i+1)

if __name__ == '__main__':
    solve()


def solve():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))
    c = 10000
    ci = 0
    for i, x in enumerate(h):
        tmp = abs(a - (t - x * 0.006))
        if c > tmp:
            c = tmp
            ci = i
    print(ci + 1)

if __name__ == '__main__':
    solve()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int,input().split())
array = list(map(lambda x: abs(a - (t - int(x) * 0.006)),input().split()))
print(array)
cnt = 0
Min = 9999
for i in range(n):
    if Min > array[i]:
        Min = array[i]
        cnt = i + 1
print(cnt)

n = int(input())
t, a = map(int,input().split())
array = list(map(lambda x: abs(a - (t - int(x) * 0.006)),input().split()))
cnt = 0
Min = 9999
for i in range(n):
    if Min > array[i]:
        Min = array[i]
        cnt = i + 1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
Temp, A = list(map(int, input().split()))
H = list(map(float, input().split()))
k = 0
target = float("inf")
n = []
for i, v in enumerate(H, start=1):
    k = Temp - v * float(0.006)
    if target > abs(k - A):
        target == abs(k - A)
        n.append(i)

print(n[-1])


N = int(input())
Temp, A = list(map(int, input().split()))
H = list(map(float, input().split()))
k = 0
target = float("inf")
n = []
for i, v in enumerate(H, start=1):
    k = Temp - v * float(0.006)
    if target > abs(k - A):
        target = abs(k - A)
        n.append(i)

print(n[-1])


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.armmin(h) + 1)

n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * (-0.006)))
print(np.armmin(h) + 1)

n = input()
t, a = map(float, input().split())
h = list(map(float, input().split()))
for i in range(n):
  h[i] = abs( a - (t - h[i] * (-0.006)))
print(min(h))

n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.armmin(h) + 1)

import numpy as np
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
for i in range(n):
    h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h)+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=[int(i) for i in input().split()]
H=np.array([1000,2000])
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin())

import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=np.array([int(i) for i in input().split()])
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin()+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T,A=map(int,input().split())
H=list(map(int, input().split()))

B=abs(A)*9999999
X=0
for i in range(N):
  if B>abs((T-H[i]*0.006)-A):
    X=i+1
    B=min(abs((T-H[i]*0.006)-A),B)
  print(B)

print(X)

N=int(input())
T,A=map(int,input().split())
H=list(map(int, input().split()))

B=999999999999999
X=0
for i in range(N):
  if B>abs((T-H[i]*0.006)-A):
    X=i+1
    B=min(abs((T-H[i]*0.006)-A),B)

print(X)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
hl = list (map(intinput().split()))

dt = 10**9
num = 0
for i in range(n):
  ti = t = hl[i]*0.006
  if abs(a - ti) <= dt:
    dt = abs(a -ti)
    num = i
    
    
print(num + 1)

n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))

dt = 10**9
num = 0
for i in range(n):
    ti = t - hl[i] * 0.006
    if abs(a - ti) <= dt:
        dt = abs(a - ti)
        num = i

print(num + 1)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
from sys import stdin
import numpy as np
from copy import deepcopy

N = input()
T, A = list(map(int,input().split()))
H = list(map(int,input().split()))

var = float('inf')
idx = 1
for i in range(len(H)):
  if (abs(T-A-0.0006*H[i]) < var):
    var = abs(T-A-0.0006*H[i])
    idx = i
    
print(int(idx+1))

from sys import stdin
import numpy as np
from copy import deepcopy

N = input()
T, A = list(map(int,input().split()))
H = list(map(int,input().split()))


var = float('inf')
idx = 1
for i in range(len(H)):
  if (abs(T-A-0.006*H[i]) < var):
    var = abs(T-A-0.006*H[i])
    idx = i
    
print(int(idx+1))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int, input().split())
list_H = list(map(int, input().split()))

ls = [abs(A-(T-x*6/1000)) for x in list_H]
print(ls.index(min(ls)))

ls = [abs(A-(T-x*6/1000)) for x in list_H]
ls.index(min(ls)+1)

N = int(input())
T,A = map(int, input().split())
list_H = list(map(int, input().split()))

ls = [abs(A-(T-x*6/1000)) for x in list_H]
print(ls.index(min(ls))+1)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
list = [] * N

for i in range(N):
	list.append(abs(T - H[i] * 0.0006 - A))

print(list.index(min(list)) + 1)

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
list = [] * N

for i in range(N):
	list.append(abs(T - H[i] * 0.0006 - A))

print(list)
print(list.index(min(list)) + 1)

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
list = [] * N

for i in range(N):
	list.append(abs(T - H[i] * 0.006 - A))

print(list.index(min(list)) + 1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
diff = 10000000
index = 0

for i in range(n):
    temp_diff = abs(t - 0.006 * h[i] -a)
    if temp_diff <= diff:
        index = i+1

print(index)

n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

index = 1
diff = []

if n == 1:
    print(n)
    exit()

diff.append(abs(t - 0.006 * h[0] - a))

for i in range(1, n):
    diff.append(abs(t - 0.006 * h[i] -a))
    if diff[i] <= diff[index]:
        index = i

print(index+1)

n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
num = 0
min_temp = 10000000
for i in range(n):
    temp = t - (0.006*h[i])
    temp_diff = abs(a - temp)
    if temp_diff < min_temp:
        min_temp = temp_diff
        num = i

print(num+1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T,A=(int(i) for i in input().split())
Temp=[T-0.006*int(input()) for i in range(N)]
dif=[abs(A-Temp[j]) for j in range (N)]
print(dif.index(min(dif))+1)


N=int(input())
T,A=(int(i) for i in input().split())
Hlist=[int(i) for i in input().split()]
Temp=[T-0.006*Hlist[i] for i in range(N)]
dif=[abs(A-Temp[j]) for j in range (N)]
print(dif.index(min(dif))+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
H_t = [T - 0.006 * h for h in H]
print(H_t)
min_dif = abs(H_t[0] - A)
ans = 0
for i in range(1, len(H_t)):
    if abs(H_t[i] - A) < min_dif:
        min_dif = abs(H_t[i] - A)
        ans = i
print(ans + 1)


N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
H_t = [T - 0.006 * h for h in H]
min_dif = abs(H_t[0] - A)
ans = 0
for i in range(1, len(H_t)):
    if abs(H_t[i] - A) < min_dif:
        min_dif = abs(H_t[i] - A)
        ans = i
print(ans + 1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
N = map(int, input().split())
i = 9999
j = 1
for ids,k in enumerate(N):
  if abs(A - (T - k * 0.006)) < i : 
    i = abs(A - (T - k * 0.006))
    j = ids

print(j)    

B = int(input())
T, A = map(int, input().split())
N = map(int, input().split())
i = 9999
j = 1
for ids,k in enumerate(N):
  if abs(A - (T - k * 0.006)) < i : 
    i = abs(A - (T - k * 0.006))
    j = ids

print(j + 1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(n):
  l.append(abs(a-(t-x*6/1000)))
print(l.index(min(l))+1)


n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(n):
  l.append(abs(a-(t-h[i]*6/1000)))
print(l.index(min(l))+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [T-0.006*int(h) for h in input().split(" ")]

place = 0
diff_min = T

for cnt, t in enumerate(temp):
  if abs(T-t) < diff_min:
    diff_min = abs(T-t)
    place = cnt

print(place)
  

N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [int(T-0.006*h) for h in int(input().split(" "))]

place = 0
diff_min = 0

for cnt, t in enumerate(temp):
  if abs(T-t) < diff_min:
    diff_min = abs(T-t)
    place = cnt

print(place)
  

N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [T-0.006*int(h) for h in input().split(" ")]

place = 0
diff_min = 60

for cnt, t in enumerate(temp):
  if abs(A-t) < diff_min:
    diff_min = abs(A-t)
    place = cnt

print(place)
  

N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [T-0.006*int(h) for h in input().split(" ")]

place = 0
diff_min = abs(temp[0]-A)

for cnt, t in enumerate(temp):
  if abs(A-t) < diff_min:
    diff_min = abs(A-t)
    place = cnt

print(place)
  

N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [T-0.006*int(h) for h in input().split(" ")]

place = 0
diff_min = abs(temp[0]-A)

for cnt, t in enumerate(temp,1):
  if abs(A-t) < diff_min:
    diff_min = abs(A-t)
    place = cnt

print(place)
  


N = int(input())
T, A = [int(i) for i in input().split(" ")]
temp = [T-0.006*int(h) for h in input().split(" ")]

place = 1
diff_min = abs(temp[0]-A)

for cnt, t in enumerate(temp,1):
  if abs(A-t) < diff_min:
    diff_min = abs(A-t)
    place = cnt

print(place)
  

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A))

import numpy as np
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A))


import numpy as np
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A)+1)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int, input().split())
H = input().split() 
Hls = []

c = 1
for i in H:
    Hls.append((abs(A - (T - int(i)*0.006)),int(c)))
    c = c+1



N = int(input())
T,A = map(int, input().split())
H = input().split() 
Hls = []

c = 1
for i in H:
    Hls.append((abs(A - (T - int(i)*0.006)),int(c)))
    c = c+1

print(min(Hls)[1])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A=map(int, input().split())
H=list(map(int, input().split()))
H=[abs(A-(T-h*0.006)) for h in H]
print(H.index(min(H)))

N = int(input())
T,A=map(int, input().split())
H=list(map(int, input().split()))
H=[abs(A-(T-h*0.006)) for h in H]
print(H.index(min(H))+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
tem = 1000
for i in h:
  c = t-0.006*i
  d = c - a
  if d**2 < tem:
    tem = c
answer = h.index(tem) + 1
print(answer)


n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
tem = 1000
z = 0
for i in h:
  c = t-0.006*i
  d = c - a
  e = tem - a
  if d**2 < e**2:
    tem = c
    z = i 
print(z+1)


n = int(input())
t,a = map(int,input().split())
h = map(int,input().split())
tem = 1000
for i in h:
  c = t-0.006*i
  d = c - a
  if d**2 < tem:
    tem = c
print(int(tem))

n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
tem = 1000
z = 0
for i in h:
  c = t-0.006*i
  d = c - a
  e = tem - a
  if d**2 < e**2:
    tem = c
    z = i 
aa = h.index(z) + 1
print(aa)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
temp = 10 ** 6
ans = 0
height = list(map(int, input().split()))
for i, h in enumerate(height):
    diff = abs(a - (t - h * 0.006))
    print(diff)
    if temp > diff:
        temp = diff
        ans = i + 1
print(ans)

n = int(input())
t, a = map(int, input().split())
temp = 10 ** 6
ans = 0
height = list(map(int, input().split()))
for i, h in enumerate(height):
    diff = abs(a - (t - h * 0.006))
    if temp > diff:
        temp = diff
        ans = i + 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
z = [abs(T-h*0.006-a) for h in H]
print( z.index(min(z)) +1 )

n = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
z = [abs(a - (t - h*0.006)) for h in H]
print( z.index(min(z)) +1 )

n = int(input())
T,A = map(int, input().split())
H = map(int, input().split())
z = [abs(a - t - h*0.006) for h in H]
print( z.index(min(z)) +1 )

n = int(input())
T,A = map(int, input().split())
H = map(int, input().split())
z = [abs(a - (t - h*0.006)) for h in H]
print( z.index(min(z)) +1 )

n = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
z = [abs(A - (T - h*0.006)) for h in H]
print( z.index(min(z)) +1 )

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l = [abs(a-(t-i*0.006)) for i in h]
print(l.index(min(l))+1)

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
l = [T - h*0.006 for h in H]
print(l.index(min(l, key=lambda v: abs(A - v))) + 1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())
def calc(A):
  return((T - A) / 0.006)

H = list(map(int,input().split()))
x = calc(A)
ans=x
for i in range(N):
  if abs(H[i] - x) < abs(ans):
    ans = H[i] - x
    
ans = int(ans + x)
print(H.index(ans))




N = int(input())
T,A = map(int,input().split())
def calc(A):
  return((T - A) / 0.006)

H = list(map(int,input().split()))
x = calc(A)
ans=max(H) - x
for i in range(N):
  if abs(H[i] - x) < abs(ans):
    ans = H[i] - x
    
ans = int(ans + x)
print(H.index(ans)+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
print(h)
for i in range(n):
    h[i] = abs(t-(h[i]*0.006)-a)
ans = h.index(min(h))+1
print(ans)


n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))

for i in range(n):
    h[i] = abs(t-(h[i]*0.006)-a)
ans = h.index(min(h))+1
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
list = [int(i) for i in input().split()]

dif_list = []
answer = 0

for i in range(n):
    t_i = t - list(i) * 0.006
    t_i_dif = abs(a - t_i)
    dif_list.append(t_i_dif)
    if min(dif_list) == t_i_dif:
        answer = i + 1

print(answer)


n = int(input())
t, a = map(int, input().split())
list = [int(i) for i in input().split()]

dif_list = []

for i in range(n):
    t_i = t - list[i] * 0.006
    t_i_dif = abs(a - t_i)
    dif_list.append(t_i_dif)

Min = min(dif_list)
print(dif_list.index(Min) + 1)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))

for i in H:
    temp = T-i*0.006-A
print(min(temp))

N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))
t = [abs(T - H[i]*0.006-A) for i in range(N)]
print(t.index(min(t))+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ab=[0]*n
for i in range(n): ab[i]=abs(a-(t-h[i]*0.006))
print(h.index(min(ab))+1)

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ab=[0]*n
for i in range(n): ab[i]=abs(a-(t-h[i]*0.006))
print(ab.index(min(ab))+1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(float, input().split( ))
h = list(map(float, input().split( )))
ans= float(0)
c1 = float(0)
c2 = float(1000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.0006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
    c2 = c1
print(ans)

n = int(input())
t,a = map(int, input().split( ))
h = list(map(int, input().split( )))
ans=int(0)
c1 = int(0)
c2 = int(1000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.0006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
    c2 = c1
print(ans)

n = int(input())
t,a = map(int, input().split( ))
h = list(map(int, input().split( )))
ans=int(0)
c1 = int(0)
c2 = int(1000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.0006))
    c1 = abs(c1)
    print("c1",c1)
    if c1 <= c2:
        ans = i+1
    c2 = c1
print(ans)

n = int(input())
t,a = map(float, input().split( ))
h = list(map(float, input().split( )))
ans= float(0)
c1 = float(0)
c2 = float(100000000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
        c2 = c1
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
t, a = rm()
ansv = 0
ansi = 0
for i, v in enumerate(rl()):
  if abs(a-t+v*0.006) < ansv:
    ansv = abs(a-t+v*0.006)
    ansi = i+1
print(ansi)
  
    










import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
t, a = rm()
ansv = inf
ansi = 0
for i, v in enumerate(rl()):
  if abs(a-t+v*0.006) < ansv:
    ansv = abs(a-t+v*0.006)
    ansi = i+1
print(ansi)
  
    










Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h_list = list(map(int,input().split()))

temp_list=[]

for h in h_list:
	temp_list.append(abs(a-t-h*0.006))
print(temp_list.index(max(temp_list)) + 1)

n = int(input())
t, a = map(int, input().split())
h_list = list(map(int,input().split()))

temp_list=[]

for h in h_list:
	temp_list.append(abs(t-h*0.006-a))

print(temp_list.index(min(temp_list)))

n = int(input())
t, a = map(int, input().split())
h_list = list(map(int,input().split()))

temp_list=[]

for h in h_list:
	temp_list.append(abs(t-h*0.006-a))

print(temp_list.index(min(temp_list)) + 1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())
H = map(int,input().split())
x = (A-T)/0.006
diff = float("inf")
ret = 0
for i,h in enumerate(H):
  if abs(h - x) < diff:
    diff = abs(h-x)
    ret = i
print(ret)

N = int(input())
T,A = map(int,input().split())
H = map(int,input().split())
#x = (A-T)/0.006
diff = float("inf")
ret = 0
for i,h in enumerate(H):
  if abs(T-h*0.006-A) < diff:
    diff = abs(T-h*0.006-A)
    ret = i
print(ret+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def temp(t, x):
    return t - x * 0.006


n = int(input())
t, a = map(int, input().split())
hs = list(map(int, input().split()))

index = None
min_diff = float('inf')
for i in range(n):
    diff = abs(temp(t, hs[i]) - a)
    if diff < min_diff:
        diff = min_diff
        index = i
print(i + 1)





def temp(T, x, A):
    return abs(A - (T - 0.006 * x))

N = int(input())
T, A = map(int, input().split())
H = map(int, input().split())

min_diff = temp(T, H[0], A)
answer = 0
for i in range(1, N):
    diff = temp(T, H[i], A)
    if diff < min_diff:
        answer = i
        min_diff = diff
print(answer)


def temp(t, x):
    return t - x * 0.006


n = int(input())
t, a = map(int, input().split())
hs = list(map(int, input().split()))

index = None
min_diff = float('inf')
for i in range(n):
    diff = abs(temp(t, hs[i]) - a)
    if diff < min_diff:
        min_diff = diff
        index = i
print(index + 1)



Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N=input()
T,A=map(int,input().split())
H=[abs(T-0.006*x-A) for x in map(int,input().split())]
print(H)
print(H.index(min(H))+1)

N=input()
T,A=map(int,input().split())
H=[abs(T-0.006*x-A) for x in map(int,input().split())]
print(H.index(min(H))+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T,A=map(float,input().split())
H=list(map(float,input().split()))
d=[]
for i in H:
  d.append(abs(T-i*0.006))
print(d.index(min(d))+1)

N=int(input())
T,A=map(float,input().split())
H=list(map(float,input().split()))
d=[]
for i in H:
  d.append(abs(A-(T-i*0.006)))
print(d.index(min(d))+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())

H=list(map(int,input().split()))

x = (T - A)/6*1000
out = 10000000

for i in range(len(H)):
    if out > abs( x - H[i]):
        out = H[i]
        O = i+1

print(O)


N = int(input())
T,A = map(int,input().split())

H=list(map(int,input().split()))

out = 10000000

for i in range(len(H)):
    now = abs( A - (T-(H[i]*0.006)))
    if out > now:
        out = now
        O = i+1

print(O)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

min_diff = 100000
counter = 0
for i in range(N):
    diff = abs(A - T + H[i] * 0.006)
    if diff < min_diff:
        counter = i + 1

print(counter)

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

min_diff = 100000
counter = 0
for i in range(N):
    diff = abs(A - T + H[i] * 0.006)
    if diff < min_diff:
        counter = i + 1
        min_diff = diff

print(counter)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
input2 = input()
t,a = input2.split(' ')
T = int(t)
A = int(a)
input3 = input()
H = list(map(int,input3.split(' ')))

answer = 0
min = 0
for i in range(N):
    heikin = T - H[i] * 0.0006
    if i != 0:
        if min > abs(A - heikin):
            min = abs(A - heikin)
            answer = i + 1
    else:
        min = abs(A - heikin)
        answer = 1
print(answer)

N = int(input())
input2 = input()
t,a = input2.split(' ')
T = int(t)
A = int(a)
input3 = input()
H = list(map(int,input3.split(' ')))

answer = 0
min = 0
for i in range(N):
    heikin = T - H[i] * 0.006
    
    
    #print(min)
    if i != 0:
        if min > abs(A - heikin):
            min = abs(A - heikin)
            answer = i + 1
    else:
        min = abs(A - heikin)
        answer = 1
print(answer)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = [float(i) for i in input().split()]
Hi = [float(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = T - i*0.006 for i in Hi
Result = [abs(i) for i in (Ave - A)]
print(index(min(Result))+1)


N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = T - i*0.006 for i in Hi
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


N = int(input())
T,A = [int(i) for i in input().split()]
Hi = [int(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)

N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted