Problem:
 Score: 200 points    Problem Statement 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.      Constraints  1 \leq N \leq 1000  0 \leq T \leq 50  -60 \leq A \leq T  0 \leq H_i \leq 10^5  All values in input are integers.  The solution is unique.         Input Input is given from Standard Input in the following format:  N  T  A  H_1  H_2  ...  H_N       Output Print the index of the place where the palace should be built.        Sample Input 1 2
12 5
1000 2000      Sample Output 1 1   The average temperature of Place 1 is 12-1000 \times 0.006=6 degrees Celsius.  The average temperature of Place 2 is 12-2000 \times 0.006=0 degrees Celsius.   Thus, the palace should be built at Place 1 .       Sample Input 2 3
21 -11
81234 94124 52141      Sample Output 2 3

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

D = 99999999
R = 0

for i, h in enumerate(H):
    d = abs(A - (T - h * 0.006))
    if D > d:
        D = d
        R = i + 1

print(R)

Solution (Python):
n = int(input())
t,a = map(float,input().split())
list = input().split()
list = map(float,list)
alist = []
count = 0
for h in list:
	count += 1
	temp = a - (t - (h*0.006))
	
	alist.append(abs(temp))

x = min(alist)

answer = alist.index(x)

print(answer + 1,end='')

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=[[abs(t-x*0.006-a)]for x in map(int,input().split())]
print(h.index(min(h))+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
places = list(map(int, input().split()))

ans = 1000000000000
leastDiff = 10000000000000000

for i in range(len(places)):
	x = places[i]
	
	thisTemp = t - (x * 0.006)
	
	thisDiff = abs(thisTemp - a)
	
	if thisDiff < leastDiff:
		ans = i
		leastDiff = thisDiff
print(ans+1)

Solution (Python):
import numpy as np
N = int(input())
T,A = map(int,input().split())
H = np.array(list(map(int, input().split())))
H = np.abs(T - H*0.006 -A)
print(np.argmin(H) +1)

Solution (Python):
def calcTmp(T, height):
    Tmp = T - (0.006 * height)
    return Tmp

def main():
    N = int(input())
    (T, targetTMP) = map(int,input().split())
    heightlist = list(map(int,input().split()))
    nearestTmpdef = 1145141919
    nearestIdx = 0

    for i in range(N):
        tmp = calcTmp(T,heightlist[i])
        tmp_deff = abs(targetTMP - tmp)
        if tmp_deff < nearestTmpdef:
            nearestTmpdef = tmp_deff
            nearestIdx = i
    print(nearestIdx+1)

main()

Solution (Python):
N=int(input())
T,A=map(int,input().strip().split())
xm=list(map(int,input().strip().split()))
Ave=[]
for i in range(N):
    Ave.append(abs(A-(T-xm[i]*0.006)))
print(Ave.index(min(Ave))+1)

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

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

mindiff = 1e9
ans = -1

for i in range(N):
  if abs(T - 0.006*H[i] -A) < mindiff:
    mindiff = abs(T - 0.006*H[i] -A)
    ans = i+1
    
print(ans)

Solution (Python):
n = int(input())
t, a = map(float, input().split())
h = [float(i) for i in input().split()]

ans = -1
mini = 1<<30
for i in range(n):
    diff = abs(t - h[i] * 0.006 - a)
    if mini > diff:
        mini = diff
        ans = i + 1

print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h = list(map(int,input().split()))
minimu = 1234567890

for i in range(n):
        if( minimu > abs(t-h[i]*0.006-a)):
                minimu=abs(t-h[i]*0.006-a)
                ans = i+1
print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
*x,=map(lambda x:abs(t-x*0.006-a),map(int,input().split()))
print(x.index(min(x))+1)

Solution (Python):
n = input()
t, a = map(int, raw_input().split())
l=600.0
H=map(int, raw_input().split())
ans=n+1
for i in range(n):
    if abs(a-(t-H[i]*0.006)) <l:
        l=abs(a-(t-H[i]*0.006))
        ans=i+1

print ans

Solution (Python):
N = int(input())
T, A = (int(x) for x in input().split())
altitude_list = [int(x) for x in input().split()]
for index, item in enumerate(altitude_list) :
    avr = T - item * 0.006
    dif = abs(A - avr)
    if index == 0 or dif < mini :
        mini = dif
        num = index
print(num + 1)

Solution (Python):


n=int(raw_input())
t,a=map(int,raw_input().split())
h=map(int,raw_input().split())
m=[]
for i in xrange(n):
 m.append(abs(1.0*(t-a-h[i]*0.006)))
res=[i for i, x in enumerate(m) if x == min(m)]
print res[0]+1

Solution (Python):
N=int(input())
T,A=[int(i) for i in input().split()]
H=[int(i) for i in input().split()]
dic=None
p=0

for i in range(N):
	ti=T-(H[i]*0.006)
	
	if dic is not None:
		if dic > abs(A-ti):
			dic = abs(A-ti)
			p=i
	else:
		dic = abs(A-ti)
		p=i
print(p+1)

Solution (Python):
N = int(input())
T, A = map(int,input().split())
log = list(map(int,input().split()))

D = float('inf')

for i,val in enumerate(log,1):
    iA = T - val * 0.006
    iD = abs(A - iA)
    if iD < D:
        D = iD
        idx = i

print(idx)

Solution (Python):
I=lambda:list(map(int,input().split()))
n=I()
t,a=I()
s=10**7
p=0
A=I()
for j in range(len(A)):
  i=A[j]
  q=abs(a-(t-0.006*i))
  if q < s:
    s = q
    p = j+1
print(p)

Solution (Python):
p = int(input())
T,A = map(int, input().split())
r = list(map(int, input().split()))

ans = -1
tmp = float('inf')
for i in range(p):
    t = T - r[i] * 0.006
    if abs(t - A) < tmp:
        tmp = abs(t - A)
        ans = i + 1
print(ans)

Solution (Python):
N = int(input())
T, A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]

ans = -1
nearest = float('inf')
for k, h in enumerate(H, 1):
    
    tmp = abs(1000 * A - (1000 * T - 6 * h))
    if tmp < nearest:
        ans = k
        nearest = tmp
print(ans)

Solution (Python):


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

ans = -1
tmp = float('inf')
for i in range(N):
    t = T - hN[i] * 0.006
    if abs(t - A) < tmp:
        tmp = abs(t - A)
        ans = i + 1
print(ans)

Solution (Python):

from sys import stdin

N = int(stdin.readline().rstrip())
T,A = [int(x) for x in stdin.readline().rstrip().split()]
H = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
target = 100000

for i in range(N):
    deg = T - H[i]*0.006
    gap = abs(deg - A)
    if gap < target:
        ans = i
        target = gap

print(ans+1)

Solution (Python):
n = int(input())
t, a = input().split()
t = int(t)
a = int(a)
h = []
h = input().split()
for i in range(n):
    h[i] = int(h[i])
realans = 0
diff = abs(t- (h[0]* 0.006)-a)
temp = 0
for i in range(n):
    temp = t- (h[i]* 0.006)
    if diff >= abs(temp-a):
        diff = abs(temp-a)
        realans = i + 1
    
print(realans)

Solution (Python):
n = int(input())
t, a = map(int, input().split(" "))
h = list(map(int, input().split(" ")))

b = [abs((t - 0.006*h_i) - a) for h_i in h]
print(b.index(min(b))+1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=1
c=abs(t-h[0]*0.006-a)
for i in range(n) :
  if(abs(t-h[i]*0.006-a)<c):
    b=i+1
    c=abs(t-h[i]*0.006-a)
  else:
    continue
print(b)

Solution (Python):

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


ans = 0
ans_diff = float("inf")


for i in range(n):
    i_diff = abs(t - hs[i] * 0.006 - a)
    if i_diff < ans_diff:
        ans = i + 1
        ans_diff = i_diff
print (ans)

Solution (Python):
test_case = int(input())
t, a = map(int, input().rstrip().split())
xs = list(map(int, input().rstrip().split()))
result = None
idx = None

for i in range(len(xs)):
    x = xs[i]
    temp = abs(t - x*0.006 - a)
    if result is None:
        result = temp
        idx = i+1
    elif temp < result:
        result = temp
        idx = i + 1
print(idx)

Solution (Python):

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

rs = []
for h in Hs:
    hh = T - (h * 0.006)
    rs .append(abs(A - hh))

rr = None
for i, r in enumerate(rs):
    if rr == None:
        rrr = i
        rr = r
        continue
    if r < rr:
        rrr = i
        rr = r
print(rrr + 1)

Solution (Python):
N = input()
T, A = map(int, input().split())
targets = list(map(int, input().split()))
 
result = 0
min = 0
 
for i, target in enumerate(targets):
  temp = T - target * 0.006 
  if i == 0:
    result = i + 1
    min = abs( A - temp )
  elif abs( A - temp ) < min :
    result = i +1 
    min = abs( A - temp )
 
print(result)

Solution (Python):
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)
print(h.index(min(h))+1)

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

Solution (Python):
n = int(input())

t , a = map(int, input().split())

h = [int(i) for i in input().split()]

dif_m = float("inf")
dif_h = 0
dif_n = 0

for i in range(n):
    dif_h = abs (a - (t - h[i] * 0.006))
    if dif_m > dif_h:
        dif_m = dif_h
        dif_n = i + 1
    
print(dif_n)

Solution (Python):

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

re = 1000000
index = 0

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

print(index + 1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
temp=[t-i*0.006 for i in h]
aaa=[abs(i-a) for i in temp]
ans=min(aaa)
for i in range(n):
  if aaa[i]==ans:
    print(i+1)

Solution (Python):
if __name__ == "__main__":
    C = 0.006
    N = int(input())
    T, A = map(int, input().split())
    H_list = map(int, input().split())

    t_list = map(lambda x: T - C * x, H_list)
    abs_list = list(map(lambda x: abs(x - A), t_list))
    print(abs_list.index(min(abs_list)) + 1)

Solution (Python):
import numpy as np
import functools

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

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

T_H = []
for i in range(len(H)):
    T_H.append(calc_temp(T, H[i]))

list_A = [A] * N




diff_T_H = []
for i in range(len(H)):
    diff_T_H.append(abs(T_H[i] - list_A[i]))




min_index = diff_T_H.index(min(diff_T_H)) + 1
print(min_index)

Solution (Python):
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)
print(h.index(min(h))+1)

Solution (Python):
n = int(input())
t,a = map(int, input().split())
arr = list(map(int,input().split()))

dig = float("inf")
num = 0

for i in range(n):
    ans = t - arr[i] * 0.006
    if dig > abs(a - ans):
        dig = abs(a - ans)
        num = i + 1
print(num)

Solution (Python):
def inpl(): return [int(i) for i in input().split()]
N = int(input())
T, A = inpl()
H = inpl()
for i in range(N):
    H[i] = (abs(T-0.006*H[i]-A),i)
H = sorted(H,key = lambda x: x[0])
print(H[0][1]+1)

Solution (Python):
n=int(input())
t,a=map(float,input().split())
h=input().split()
i=0
min_dis=1000000
p=0
while i<len(h):
    p_w=t-float(h[i])*0.006
    w=a-p_w
    if a-p_w<0:
        w=p_w-a
    if w<min_dis:
        min_dis=w
        p=i+1
    i+=1
print(p)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
import math
num=[]
temp=[]
ans=float("inf")
for i in range(n):
    num.append(t-0.006*h[i])
for i in range(n):
    temp.append(abs(num[i]-a))
ans=min(temp)
for i in range(n):
    if ans==temp[i]:
        print(i+1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[int(i) for i in input().split()]
I=[T-item*0.006 for item in H]
D=[abs(A-item) for item in I]
print((D.index(min(D)))+1)

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

min_diff = float('inf')
ans = -1

for i, h in enumerate(H):
    ave = T - h * 0.006
    if abs(ave - A) < abs(min_diff - A):
        min_diff = ave
        ans = i

print(ans + 1)

Solution (Python):
N=int(input())
T,A=map(int,input().split(" "))
H=list(map(int,input().split(" ")))
for i,items in enumerate(H):
  H[i]=T-items*0.006-A
  if(H[i]<0):
    H[i]=-H[i]
print(H.index(min(H))+1)

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
T,A=[int(x) for x in stdin.readline().rstrip().split()]
elev=[int(x) for x in stdin.readline().rstrip().split()]
cnt=0
comp=10000
for i in elev:
    cnt+=1
    temperature=T-(i*0.006)
    tmp=abs(A-temperature)
    if comp > tmp:
        comp=tmp
        ans=cnt
print(ans)

Solution (Python):
import sys

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

for i in range(len(hs)):
    hs[i] = float(hs[i])

ts = []
for h in hs:
    ts.append(t - h * 0.006)

min = 0
min_t = sys.maxsize
for i in range(len(hs)):
    dt = abs(ts[i] - a)
    if dt < min_t:
        min = i
        min_t = dt
print(min + 1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
t=t-a
lst=list(map(int,input().split()))
a=[]
i=1
for e in lst:
    a.append([abs(t-e*0.006),i])
    i+=1
a.sort()
print(a[0][1])

Solution (Python):
N = int(input())
T, A = list(map(int, input().strip().split(' ')))
array = list(map(int, input().strip().split(' ')))
c=(T-array[0]*0.006)-A
C = abs(c)
ans=[]
for i in array:
  x = (T-i*0.006)-A
  num = abs(x)
  if num<=C:
    C=num
    ans.append(i)
n = ans[-1]
Ans=array.index(n)+1
print(Ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
tt=0
tt_1=0
tt_2=0
b=0
c=0

t_list=[]
t_list_2=[]
for val in h:
	tt=t-(val*0.006)
	t_list.append(tt)

for val in t_list:
	tt=abs(a-val)
	t_list_2.append(tt)

t_list_2=sorted(t_list_2)
tt=t_list_2[0]
tt_1=a+tt
tt_2=a-tt

def my_index(t_list,x,default=False):
	if x in t_list:
		return t_list.index(x)
	else:
		return -1
b=my_index(t_list,tt_1)
c=my_index(t_list,tt_2)
if my_index(t_list,tt_1) == -1:
	print(c+1)
else :
	print(b+1)

Solution (Python):
N = input()
T, A = map(int, input().split())
Hs = list(map(int, input().split()))
result1 = []
for x in Hs:
    tmp = T - (x * 0.006)
    result1.append(tmp)
result2 = {}
for i, tmp in enumerate(result1):
    result2[i+1] = abs(A - tmp)
print(sorted(result2.items(), key=lambda x: x[1])[0][0])

Solution (Python):
n=input()
t,a=input().split()
n=int(n)
t=int(t)
a=int(a)
b=input().split()
min=1000
for i in range(n):
    diff=abs(a-t+0.006*int(b[i]))
    if min>diff:
        id=i+1
        min=diff

print (id)

Solution (Python):
N = int(input())
T, A = list(map(int, input().split()))
hs = list(map(int, input().split()))

indx = -1
error = 10000

for i, h in enumerate(hs):
    temp = T - h * 0.006
    if abs(temp - A) < error:
        indx = i
        error = abs(temp - A)
print(indx+1)

Solution (Python):
n=int(input())
t,a= (int(i) for i in input().split())  
listx = [int(i) for i in input().split()]  
listy=[]
for i in range(n):
    avgx=t-0.006*int(listx[i])
    y=abs(a-avgx)
    listy.append(y)
print(listy.index(min(listy))+1)

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

ts = [t-i*0.006 for i in h]
d = [abs(a-i) for i in ts]
print(d.index(min(d))+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
Hs = list(map(int, input().split()))


def get_temp(height):
    return T - (0.006 * height)


ans = -1
cht = abs(get_temp(100000) - (-60))


for i in range(N):
    t = abs(get_temp(Hs[i]) - A)
    if t < cht:
        ans = i + 1
        cht = t

print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
HL = list(map(int, input().split()))

HL1 = [(x[0], abs(A - (T - x[1] * 0.006)), ) for x in enumerate(HL)]

HL1.sort(key=lambda x: x[1])

print(HL1[0][0] + 1)

Solution (Python):
grid = []
for i in range(3):
    array = list(map(int, input().strip().split(' ')))
    grid.append(array)
x = 0
result = []
while x < grid[0][0]:
    calc = grid[1][0] - grid[2][x] * 0.006
    result.append(calc)
    x += 1

y = 0
result_comp = []
while y < len(result):
    comp = result[y] - grid[1][1]
    comp = abs(comp)
    result_comp.append(comp)
    y += 1

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

Solution (Python):
import numpy as np
N = int(input())
T,A = map(int,input().split())
H = input().split()
differ = [0]*N
for i in range(N):
 if A < 0:
  differ[i] = abs((T - int(H[i])*0.006) - A)
 else:
  differ[i] = abs(A - (T - int(H[i])*0.006))
differ = np.array(differ)
print(differ.argmin()+1)

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

min=abs(t-h[0]*0.006-a)
ans=1
for i in range(n):
  x=abs(t-h[i]*0.006-a)
  if x<min:
    min = x
    ans=i+1
print(ans)

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

different = 10 ** 5
minpoint = 1
for i in range(N):
	ave = T - (H[i] * 0.006)
	differ = abs(A - ave)
	if different > differ:
		different = differ
		minpoint = i + 1
print(minpoint)

Solution (Python):
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)

Solution (Python):
from sys import stdin

n = int(stdin.readline().strip())
t, A = list(map(int, stdin.readline().split()))
h = list(map(int, stdin.readline().split()))

temp = []
for i in range(n):
    temp.append(t - h[i]*0.006)

dist = float('inf')
index = 0
for i, num in enumerate(temp):
    boo = abs(A - num)
    if boo < dist:
        dist = boo
        index = i

print(index+1)

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

min_diff = 10 ** 10
near_index = -1
for i, h in enumerate(H):
    t = T - h * 0.006
    if abs(t - A) < min_diff:
        min_diff = abs(t - A)
        near_index = i + 1

print(near_index)

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

i = 0
minGap = 100000
while i < N:
    AT = T - H[i] * 0.006
    gap = abs(A - AT)
    if minGap > gap:
        minGap = gap
        ans = i + 1
    i += 1

print(ans)

Solution (Python):
N = input().split()
T = input().split()
H = input().split()
maxtemp=9999999
ans = 0
for c,i in enumerate(H):
	P = int(T[0]) - int(i) * 0.006 - int(T[1])
	
	
	if min(maxtemp,abs(P)) == abs(P):
		maxtemp = abs(P)
		
		ans = c
		
print(str(ans+1))

Solution (Python):
n = int(input())
t, a = map(int, input().split(" "))
hs = list(map(int, input().split(" ")))
dif = list()
for h in hs:
    ave = t - h*0.006
    dif.append(abs(a-ave))

mindif = min(dif)

for i in range(n):
    if dif[i] == mindif:
        print(i+1)
        break

Solution (Python):
n=int(input())
t,a=map(int,input().split())

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

min=1000
for i in range(n):
  temp=abs(a-t+0.006*h[i])
  if min>temp:
    min=temp
    id=i
print(id+1)

Solution (Python):
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)

Solution (Python):



test = False

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

def main():
    d = {}
    for i in range(N):
        ave_T = T - (H[i] * 0.006)
        d['{}'.format(i+1)] = abs(A - ave_T)
    if test:
        print(d)

    min_k = min(d, key=d.get)
    print(min_k)


if __name__ == '__main__':
    main()


"""
https://note.nkmk.me/python-dict-value-max-min/
"""

Solution (Python):
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)

Solution (Python):
def main():
    n = int(input())
    t, a = list(map(float, input().split(' ')))

    min_diff = 100000000000000000000000000
    min_index = -1
    hs = list(map(float, input().split(' ')))
    for i in range(n):
        h = hs[i]
        cu_diff = abs(a - (t - h * 0.006))
        if cu_diff < min_diff:
            min_diff = cu_diff
            min_index = i

    print(min_index+1)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))




min_ = 100000000
min_i = -1
for i, h in enumerate(H):
    diff = abs(a-(t-h*0.006))
    if diff < min_:
        min_ = diff
        min_i = i + 1
print(min_i)

Solution (Python):
n = int(input())
ta = list(map(int,input().split()))
h = list(map(int,input().split()))
temp = []
for i in h:
  temp = temp + [ta[0] - i * 0.006]
sa = ta[1]-temp[0]
if (sa < 0):
  sa *= -1
loop = 1
ans = 1
for i in temp:
  j = ta[1]-i
  if (j<0):
    j *= -1
  if (j < sa):
    ans = loop
    sa = j
  loop += 1
  
print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
l=list(map(int,input().split()))
k=[]
for i in l:
  k.append(abs(a-t+i*0.006))
for i in range(0,n):
  if min(k)==k[i]:
    print(i+1)

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

s = 0
mn = 1 << 25
for i in range(N):
    t = abs(A - (T - H[i] * 0.006))
    if (mn >= t):
        s = i + 1
        mn = t
print(s)

Solution (Python):
def m():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))
    b = []
    diff = 10 ** 6
    ans = 0
    for i in range(n):
        tmp = t - h[i] * 0.006
        d = abs(tmp - a)
        b.append((d, i+1))
    b.sort(key=lambda x: x[0])
    return b[0][1]
print(m())

Solution (Python):
def solve(N, T, A, H):
  best = (T - A) / 0.006
  index = -1
  diff = -1
  for i in range(N):
    d = abs(best - H[i])
    if diff == -1 or d < diff:
      diff = d
      index = i
  return index + 1


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


print(solve(N, T, A, H))

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

best_point=0
best=float('inf')
i=0
for hi in h:
    tmp = t - (hi * 0.006)
    dif = abs(a - tmp)
    if abs(dif) < abs(best):
        best = dif
        best_point = i + 1
    i += 1
print(best_point)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
for n,i in enumerate(H):
    H[n]=T-i*0.006
for n,i in enumerate(H):
    H[n]=abs(A-i)
print(H.index(min(H))+1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[i for i in map(int,input().split())]
t1,t2=0,100000
for i in range(N):
	t1=T-H[i]*0.006
	if(abs(A-t1) < abs(A-t2)):
		t3=i+1
		t2=t1
		t1=0
	else:
		t1=0
print(t3)

Solution (Python):
import numpy as np
N = int(input())
(T,A) = map(int, input().split())
H = np.array(list(map(int,input().split())))

delta = np.abs(H*(-0.006) + (T-A))
print(delta.argmin() + 1)

Solution (Python):
n = int(input())
T, A = map(float, input().split())
h = list(map(float, input().split()))
ans = 1

temp = abs(T-h[0]*0.006-A)
tempmin = temp
for i in range(1,n):
    temp = abs(T-h[i]*0.006-A)
    if(temp<tempmin):
        ans = i+1
        tempmin = temp
print(ans)

Solution (Python):
N = int(input())
ls = input().strip().split(' ')
T = int(ls[0])
A = int(ls[1])
ls = []
n = 1
for i in input().strip().split(' '):
    ls.append((abs(T - 0.006 * int(i) - A), n))
    n += 1
ls.sort()
print(ls[0][1])

Solution (Python):
n = int(input())
t, a = map(int,input().split())
height = list(map(int,input().split()))

L = [0]*n

for i in range(0,n):
    L[i] = abs(t - height[i] * 0.006 - a)

num = 0
a = 1000

for i in range(0,n):
    a = min(a, L[i])
    if a == L[i]:
        num = i+1

print (num)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[i for i in map(int,input().split())]
t1,t2=0,100000
for i in range(N):
	t1=T-H[i]*0.006
	if(abs(A-t1) < abs(A-t2)):
		t3=i+1
		t2=t1
		t1=0
	else:
		t1=0
print(t3)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
for n,i in enumerate(H):
    H[n]=T-i*0.006
for n,i in enumerate(H):
    H[n]=abs(A-i)
print(H.index(min(H))+1)

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

for i in range(n):
    k = float(abs(a - (t - h[i] * 0.006)))
    if i == 0:
        g = k
        p = 0
    else:
        if g > k:
            g = k
            p = i

print(p+1)

Solution (Python):


import numpy as np

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

heights = list(map(int, input().split()))
temps = [T - height * 0.006 for height in heights]
rank = np.array([abs(A - temp) for temp in temps])

print(rank.argmin() + 1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
pos=list(map(int,input().split()))
 
minPos = 0
minDiff = abs( A- ( T - pos[0] * 0.006) )
 
for i in range(1,len(pos)):
  if (minDiff > abs( A- ( T - pos[i] * 0.006) )):
    minDiff = abs( A- ( T - pos[i] * 0.006) )
    minPos = i 
 
print(minPos+1)

Solution (Python):


import numpy as np

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

heights = list(map(int, input().split()))
temps = [T - height * 0.006 for height in heights]
rank = np.array([abs(A - temp) for temp in temps])

print(rank.argmin() + 1)

Solution (Python):


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

flag = 1
num = 0
for i,h in enumerate(H):
    t = float(T)-(float(h)*0.006)
    a = abs(A-t) 
    if flag == 1 :
        ans = a
        num = i
        flag = 0
    elif ans > a:
        ans = a
        num = i
print (num+1)

Solution (Python):
N = input()
T, A = map(int, input().split(" "))
H = map(int, input().split(" "))

def tempAve(x):
    return T - x * 0.006

aveH = map(tempAve, H)
aveMin = float('inf')
result = 0
for i, val in enumerate(aveH):
    diff = abs(val-A)
    if diff < aveMin:
        aveMin = diff
        result = i
print(result + 1)

Solution (Python):
def get_temp(t,h) :
	return T - h * 0.006

N = int(input())

read_line = input().split()
T = int(read_line[0])
A = int(read_line[1])

height_list = [int(s) for s in input().split()]

diff = 99999
diff_index = 0

for i in range(len(height_list)) :
	temp = get_temp(T,height_list[i])
	
	if (abs(temp - A) < diff) :
		diff = abs(temp -A)
		diff_index = i
	


print (diff_index+1)

Solution (Python):
def run():
    N=int(input())
    T,A=input().split()
    T=int(T)
    A=int(A)
    H=input().split()
    for i in range(N):
        H[i]=float(H[i])
    ans=0
    for i in range(N):
        for j in range(N):
            if(abs(T-0.006*H[ans] - A)>abs(T-0.006*H[i] - A)):
                ans=i
    print(ans+1)

run()

Solution (Python):
def main():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))

    ans, mn = 0, abs(t-h[0]*0.006-a)
    for i in range(n):
        ai = t - h[i] * 0.006
        if abs(ai-a) < mn:
            ans = i
            mn = abs(ai-a)

    print(ans+1)


if __name__ == '__main__':
    main()

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

best_point=0
best=float('inf')
i=0
for hi in h:
    tmp = t - (hi * 0.006)
    dif = abs(a - tmp)
    if abs(dif) < abs(best):
        best = dif
        best_point = i + 1
    i += 1
print(best_point)

Solution (Python):
N = int(input())
T,A = map(float, input().split())
H = list(map(float, input().split()))

Tave = [0 for _ in range(N)]
gap = [0 for _ in range(N)]
gapmin = 10000
Tmin = 0
for i in range(N):
    Tave[i] = T-0.006*(H[i])
    gap[i] = abs(Tave[i]-A)
    if gapmin>gap[i]:
        Tmin = i
        gapmin = gap[i]

print(Tmin+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
h.insert(0, 10000000000)

for i in range(1,n+1):
    h[i] = t - 0.006 * h[i]
    if(h[i]>a):
        h[i] = h[i] - a
    else:
        h[i] = a - h[i]
        
nmin = 10000000000
num = 0
for i in range(1, n+1):
    if(nmin > h[i]):
        nmin = h[i]
        num = i
        
print(num)

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

list_h = list(map(int, input().split()))
dic_t = {i:T-h*0.006 for i, h in enumerate(list_h, 1)}

min_d = 100000
min_key = 0

for key, v in dic_t.items():
    d = abs(A-v)
    if d < min_d:
        min_d = d
        min_key = key
    else:
        pass

print(min_key)

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

temp_list = [abs((t-h*0.006)-a) for h in h_list]
ans = temp_list.index(min(temp_list))+1

print(ans)

Solution (Python):
n = int(input())

t, a = map(int, input().split())

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

diff = []

for h in list_h:
  diff.append(abs(a - (t - h * 0.006)))
  
print(diff.index(min(diff)) + 1)

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

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)

Solution (Python):
n=int(input())
t,a=map(int, input().split())
h=list(map(int,input().split()))
min_gap=999
for i in range(n):
    tmp=t-0.006*h[i]
    if(abs(tmp-a)<min_gap):
        min_gap=abs(tmp-a)
        min_i=i

print(min_i+1)

Solution (Python):
def place(N,T,A,H):
    a=18000
    n=0
    for i in range(N):
        ave=T-H[i]*0.006
        if(abs(a-A)>abs(ave-A)):
            a=ave
            n=i+1
        
    return n

N=int(input())
T,A=input().split()
H=[int(i) for i in input().split()]

print(place(N,int(T),int(A),H))

Solution (Python):
N = int(input())
T, A = (int(i) for i in input().split())
H = [int(i) for i in input().split()]

H_T = [0 for i in range(len(H))]
for i in range(len(H)):
    H_T[i] = float(T) - float(H[i])*0.006

min = 1000
index = 0
for i in range(len(H_T)):
    if(abs(H_T[i] - A) < min):
        index = i
        min = abs(H_T[i] - A)
print(index+1)

Solution (Python):
N = int(raw_input())
T, A = map(int, raw_input().split(" "))

H = map(int, raw_input().split(" "))
index = 0
closet = abs(T - 0.006*H[0] - A)
for i in range(1, N):
    diff = abs(T - 0.006*(H[i]) - A)
    if diff == 0:
        index = i
        break
    elif diff < closet:
        closet, index = diff, i
print index + 1

Solution (Python):


n = map(int, raw_input().split())
t, a = map(int, raw_input().split())

h = raw_input().split()





hdiff = [0] * n[0]
for i in range(n[0]):
    hdiff[i] = abs(t - a - int(h[i]) * 0.006)



ans = hdiff.index(min(hdiff))
print ans + 1

Solution (Python):
N = input()
T, A = list(map(int, input().split()))
Hs = list(map(int, input().split()))

last = 99999999999999
lastidx = -1
for idx, h in enumerate(Hs):
  dif = abs(A - (T - 0.006 * h))
  if last > dif:
    last = dif
    lastidx = idx + 1


print(lastidx)