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 = list(map(int,input().split()))
temp_list = [t-h*0.006 for h in H_list ]
ans_list = [abs(a-x) for x in temp_list]
ans = min(ans_list)
print(ans_list.index(ans)+1)

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

diff_min = float("inf")
ans = 0
for i in range(N):
  diff = abs(A - (T - H[i] * 0.006))
  if diff < diff_min:
    diff_min = diff
    ans = i + 1
print(ans)

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

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

min_ = 10000000000000
ans = None
for i, x in enumerate(h):
    tmp = t - x*0.006
    if a > 0 and tmp > 0:
        sa = a - tmp
    elif a > 0 and tmp < 0:
        sa = a + abs(tmp)
    elif a < 0 and tmp > 0:
        sa = abs(a) + tmp
    else:
        sa = abs(a) - abs(tmp)
    sa = abs(sa)
    if sa < min_:
        min_ = sa
        ans = i + 1
print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
lst = list(map(int, input().split()))
ans_lst = []
for i in lst:
    tem = T - i * 0.006
    ans_lst.append(abs(A - tem))
index_num = ans_lst.index(min(ans_lst))
print(index_num + 1)

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

list = []

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

point = list.index(min(list)) + 1

print(point)

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


temperture = [ t - h[i] * 0.006 for i in range(n)]

tmp = abs(a - temperture[0])
ans = 0
for i in range(n):
    if tmp > abs(a - temperture[i]):
        tmp = abs(a -temperture[i])
        ans = i

print(ans+1)

Solution (Python):
n = input()
ta = [int(i) for i in input().split()] 
target = ta[0] - ta[1]
h = [abs(target - int(i) * 0.006) for i in input().split()]
print(h.index(min(h)) +1)

Solution (Python):
def calc_point(t, a, h):
        min_diff = float('inf')
        min_diff_point = None
        for i, h_v in enumerate(h):
                diff = abs(a - (t - h_v * 0.006))
                if diff < min_diff:
                        min_diff = diff
                        min_diff_point = i
        return min_diff_point


input()
t, a = [int(v) for v in input().split()]
h = [int(v) for v in input().split()]
print(calc_point(t, a, h) + 1)

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

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

Solution (Python):
N = input()

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

H = list(map(int, input().split()))
answers=[]
for h in H:
    sub = T - h*0.006
    sub = A - sub
    answers.append(abs(sub))

min_idx = answers.index(min(answers))+1

print(min_idx)

Solution (Python):
input()
T, A = map(int, input().split())
print(min([(i+1, abs(T-0.006*h-A)) for i, h in enumerate(map(int, input().split()))], key=lambda x:x[1])[0])

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

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

ans_H = (T - A)/0.006
dif = 10**20
ans = 0
for i in range(len(H)):
	temp_dif = abs(ans_H - H[i])
	if (dif > temp_dif):
		dif = temp_dif
		ans = i + 1
	
print(ans)

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
H = []
for i in range(n):
  H.append(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 = [int(s) for s in input().split()]
H = [T - x*0.006 for x in H]

palace = {}
for i in range(N):
    palace[H[i]] = abs(H[i]-A)



diff = sorted(palace.items(),key=lambda x: x[1])

if diff[0][0] in H:
    print(H.index(diff[0][0])+1)

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

temps = []

for i, v in enumerate(h):
    h[i] = t - h[i] * 0.006
    temps.append(abs(a - h[i]))

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

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

Solution (Python):
def tempDif(h,T,A):
  temp = T - 0.006*h
  dif = A -temp
  if dif < 0:
    dif = -dif
  return dif
 
N = int(input())
T,A = map(int,input().split())
lis = [int(n) for n in input().split()]
 
lisnew = [tempDif(H,T,A) for H in lis]
print(lisnew.index(min(lisnew))+1)

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

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

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

Solution (Python):


import math
import sys
from operator import itemgetter
input = sys.stdin.readline












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

t_diff = []
for h in H:
	t_diff.append(abs(float(T - A - 0.006 * h)))
print(t_diff.index(min(t_diff))+1)

Solution (Python):
N = int(input())
T,A = map(int, input().split())
min = 10000000000
c=0
for i in list(map(int,input().split())):
    c+=1
    a = T-i*0.006
    if A-a>=0: b=A-a
    else: b=a-A
    if b < min: 
        min = b
        answer = c
print(answer)

Solution (Python):
N=input()
T=list(map(int,input().split()))
H=list(map(int,input().split()))
count=0
min=1000000
for h in H:
 count=count+1
 if abs(T[0]-0.006*h-T[1])<min:
  ans=count 
  min=abs(T[0]-0.006*h-T[1])
print(ans)

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

temp = []
for i in e:
    temp.append(abs(t - i * 0.006 - a))
    
print(temp.index(min(temp)) + 1)

Solution (Python):
import numpy as np
N = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))
x = (t - a)/0.006

for i in range(N):
    H[i] = abs(x-H[i])

print(np.argmin(H) + 1)

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

diff = [abs(T-x * 0.006-A) for x in H]
print(diff.index(min(diff))+1)

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

y = 1000

for i in range(N):
    x = A - (T - H[i] * 0.006)
    if y > abs(x):
        y = abs(x)
        result = i+1

print(result)

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

Solution (Python):
def dif_temp(T, A, x):
    return abs(T - x * 0.006 - A)

N = int(input())
T, A = map(int, input().split())
H = [dif_temp(T, A, int(i)) for i in input().split()]
for i in range(N):
    if H[i] == min(H):
        print(i + 1)

Solution (Python):


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


ans = 0
min_d = 50000
for i in range(N):
    t = T - H[i] * 0.006
    d = abs(A - t)
    if d < min_d:
        min_d = d
        ans = i + 1

print(ans)

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

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

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

ts = [abs(t - item*0.006-a) for item in ts]

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

Solution (Python):

import numpy as np
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
T_list = [T-x*0.006 for x in H]
def getNearestValue(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx
print(getNearestValue(T_list, A) + 1)

Solution (Python):
n = raw_input()
t = raw_input()
t, a = int(t.split(" ")[0]),int(t.split(" ")[1])
h = raw_input()
h = [int(i) for i in h.split(" ")]

min_diff = 999999
min_i = 1
for i in range(len(h)):
	temp = t-h[i]*0.006
	diff = abs(temp-a)
	if diff<min_diff:
		min_diff = diff 
		min_i = i+1
print(min_i)

Solution (Python):
from sys import stdin

N, T, A, *H = map(int, stdin.read().split())

diff = [abs(T - h*0.006 - A) for h in H]

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

Solution (Python):
def main() -> None:
    n = int(input())
    T, A = map(int, input().split())
    H = input().split()

    min = None
    for i in range(n):
        tempture = T - int(H[i]) * 0.006
        
        if min is None:
            pos = i + 1
            min = abs(A - tempture)
        elif min > abs(A - tempture):
            pos = i + 1
            min = abs(A - tempture)
    print(int(pos))

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
min = 10000000
ans = 0
for each in range(N):
    temp = T - 0.006 * H[each]
    if min > abs(A-temp):
        min = abs(A-temp)
        ans = each

print(ans+1)

Solution (Python):
import math

if __name__ == '__main__':
    n = int(input())
    t, a = map(int, input().split())
    h = map(int, input().split())

    diff = 0
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - temp)
        

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = False

    print(answer+1)

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

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

dif = 1000

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

print(ans)

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

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

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

Solution (Python):
input()
T, A = map(int, input().split())
H = list(map(int, input().split()))
d = None
x = None
for i, h in enumerate(H):
    a = T - h * 0.006
    if d is None or d > abs(A - a):
        d = abs(A - a)
        x = i + 1
print(x)

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

dis = []
for i in range(N):
    dis.append(abs(A-(T-H[i]*0.006)))
print(dis.index(min(dis))+1)

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

temp = (t - (h*0.006))

print(np.argmin(abs(temp - a))+1)

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

tmp = [abs(A - (T - h*0.006)) for h in H]
print(tmp.index(min(tmp))+1)

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

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

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

t_ave = [tempreture(h) for h in H]

delta = [abs(t - A) for t in t_ave]

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

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

for i in H:
    x.append(abs(T - i*0.006 - A))
    
print(x.index(min(x)) + 1)

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


def solve_temp(h):
    return T-h*c


minimum = abs(A - solve_temp(H[0]))
minIndex = 0
for i in range(N):
    if minimum > abs(A - solve_temp(H[i])):
        minimum = abs(A - solve_temp(H[i]))
        minIndex = i
print(minIndex+1)

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

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

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

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

Solution (Python):
from bisect import bisect

class Solver(object):
    def __init__(self):
        self.n = int(input())
        self.t, self.a = list(map(int, input().split(" ")))
        self.locations = list(map(int, input().split(" ")))
        self.locations = [(x+1, self.t - (0.006*y)) for (x, y) in enumerate(self.locations)]
        self.locations.sort(key=lambda x: x[1])

    def solve(self):
        temps = [y for x, y in self.locations]
        b = bisect(temps, self.a)
        if b >= len(temps):
            print(self.locations[b-1][0])
        else:
            left = abs(self.a - self.locations[b-1][1])
            right = abs(self.a - self.locations[b][1])
            if left < right:
                print(self.locations[b-1][0])
            else:
                print(self.locations[b][0])

    def debug(self):
        for x in self.locations:
            print(x)


if __name__ == "__main__":
    s = Solver()
    s.solve()

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

for h in H:
    h = T - h * 0.006
    res.append(abs(h - A))

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

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

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

list_=[]
for count in range(n):
    list_.append(abs(a-t+0.006*h[count]))
i=0
while i<=n-1:
    if list_[i]==min(list_):
        print(i+1)
        break
    else:
        i+=1

Solution (Python):
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  T, A = map(int, input().split())
  H = [int(h) for h in input().split()]
  dif = float('inf')
  pos = 0
  for i in range(N):
    d = abs(A - (T - H[i] * 0.006))
    if d < dif:
      dif = d
      pos = i+1
  print(pos)


if __name__ == '__main__':
  main()

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

x = int(round((t - a) / 0.006))

d = 100000
num = -1

for i, y in enumerate(h):
    if d > abs(y - x):
        d = abs(y - x)
        num = i

print(num + 1)

Solution (Python):


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

ans, mind = 0, 1000
for i in range(N):
    td = abs(A - (T - 0.006 * H[i]))
    if mind > td:
        ans = i + 1
        mind = td

print(ans)

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

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

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

Tlist =[]

for n in range(N):
	Tlist.append(T - H[n]*0.006)

t = Tlist[0]
m = 0

for n in range(N):
	if abs(t-A) > abs(Tlist[n]-A):
		t = Tlist[n]
		m = n

M = m + 1
print(M)

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

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

H=list(map(int,input().split()))
    
new_h=[abs(t-H[i]*0.006-a) for i in range(n)]

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

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

ans = 0
ui=10000
for i in range(len(lst)):
    if ui > abs((t-lst[i]*0.006)-a):
        ui = abs((t-lst[i]*0.006)-a)
        ans = i+1
print(ans)

Solution (Python):



def main():
  n = int(input())
  t, a = map(int, input().split())
  hs = list(map(int, input().split()))
  ans = sorted([(i+1, abs( (t-0.006*h) - a )) for i, h in enumerate(hs)], key=lambda x:x[1])[0][0]
  print(ans)
  pass

if __name__=='__main__':
  main()

Solution (Python):
import numpy as np
import math
n = input()
t,a = input().split()
H = input().split()

n = int(n)
t = int(t)
a = int(a)
H = [int(h) for h in H]

ans = []
for h in H:
	ans.append(np.abs((t - h*0.006) - a))

print(np.argmin(ans)+1)

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(A - (T - 0.006 * H[i]))
m = min(H)
print(H.index(m) + 1)

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

tmp = {i+1:abs((T-H*0.006)-A) for i, H in enumerate(Hs)}
ans = min(tmp, key=tmp.get)
print(ans)

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

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

lst=[]

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

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

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = [int(i) for i in input().split()]
d = 9999999999999
num = -1
for i, hei in enumerate(h):
    e = abs(a - (t - hei*0.006))
    if e < d:
        d = e
        num = i + 1
print(num)

Solution (Python):















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

now=999999999999
for i, H_i in enumerate(H):
    temp = T - H_i*0.006
    if(abs(temp-A)<abs(now-A)):
        ans = i
        now = temp

print(ans+1)

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

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

X=[]
for i in range(N):
	X.append(abs(A-(T-H[i]*0.006)))
m=min(X)
for i in range(N):
	if X[i]==m:
		print(i+1)

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

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

sub_arr = [abs(a-(t-i*0.006)) for i in h_arr]

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

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

place_avgtmp = [abs(A - (T - h * 0.006)) for h in H]
print(place_avgtmp.index(min(place_avgtmp)) + 1)

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

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

for ix, x in enumerate(h_list):
    tmp = t - x * 0.006
    if ans > abs(a - tmp):
        ans = abs(a - tmp)
        ansi = ix + 1
print(ansi)

Solution (Python):
n = int(input())
t,a = (input().split())
t,a = int(t),int(a)
ans = 0
i = 1000000
j = 0

for h in input().split():
    j = j + 1
    h = int(h)
    tmp = t - h*0.006
    if i > abs(a-tmp):
        i = abs(a-tmp)
        ans = j
        
print(ans)

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

for i,h in enumerate(H):
    H[i]=abs(T-h*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()))

x=[]

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

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

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

ret = []
for i, h in enumerate(H):
    ret.append(abs(a - (t - 0.006 * h)))
print(ret.index(min(ret)) + 1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = [ int(i) for i in input().split() ]
ans = []
for i in range(n):
    ans.append(abs(a-(t-h[i]*0.006)))

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

Solution (Python):

option_num = int(input())
temperature, idea_temperature = map(int, input().split(" "))
options_height = map(int, input().split(" "))


palace_temperature = -999
palace_index = 0
for i, height in enumerate(options_height):
    
    option_temperature = temperature - height * 0.006
    
    if abs(idea_temperature - palace_temperature) > abs(idea_temperature - option_temperature):
        
        palace_temperature = option_temperature
        palace_index = i + 1

print(palace_index)

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

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

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

Solution (Python):
N = int(input())
T,A = [int(x) for x in input().split()]
H = [int(x) for x in input().split()]
min = 10**5
ans = 0
for index,i in enumerate(H):
    tmp = T - i*0.006
    if(abs(tmp-A)<min):
        ans = index
        min = abs(tmp-A)
print(ans+1)

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

err_T = np.array([abs(T0-0.006*H[i]-A) for i in range(N)])
idx = np.argmin(err_T)
print(idx+1)

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

for i in range(N):
  sa=T-0.006*hoge[i]-A
  if(sa<0):
    sa=-sa
  hoge[i]=sa

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

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

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

Solution (Python):
N = int(input())
ta_lst = list(map(int, input().split()))
h_lst = list(map(int, input().split()))

min_diff = 10**10
for n, i in enumerate(h_lst):
    diff = abs((ta_lst[0] - i * 0.006) - ta_lst[1])
    if diff < min_diff:
        min_diff = diff
        min_diff_index = n
print(min_diff_index+1)

Solution (Python):
import numpy as np

n = int(input())
t, a = list(map(int, input().split()))
li = np.asarray(list(map(int, input().split())))

li2 = np.abs(t - li * 0.006 - a)
print(np.argmin(li2) + 1)

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H_list=list(map(int,input().split()))
a=list(map(lambda x:abs((T-x*0.006)-A), H_list))


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

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

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

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

Solution (Python):


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

    min_d = abs(T - H[0] * 0.006 - A)
    min_i = 0
    for i in range(N):
        d = abs(T - H[i] * 0.006 - A)
        if d < min_d:
            min_i, min_d = i, d

    print(min_i + 1)


if __name__ == '__main__':
    main()

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 = input()
t,a = (int(x) for x in input().split())
h_lis = [int(x) for x in input().split()]

t_lis = [abs(a-(t-x*0.006)) for x in h_lis]
print(t_lis.index(min(t_lis))+1)

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

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
s = []
for i in range(n):
    d = abs(a-t+h[i]*0.006)
    s.append(d)

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

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

min_diff = 10000
index = 1
min_index = 0
for h in h_list:
    t = T-h*0.006
    diff = abs(t-A)
    if min_diff > diff:
        min_diff = diff
        min_index = index

    index += 1

print(min_index)

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

min = 10000000
index = -1

for i in range(N):
  temp = int(T) - int(H[i]) * 0.006
  if min > abs(int(A) - temp):
    min = abs(int(A) - temp)
    index = i

print(index+1)

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

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

Solution (Python):
N = int(input())
x = list(map(int,input().split()))
T = x[0]
A = x[1]

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

difference = 10000
ans = 0
for i in range(0,N):
	if(difference > abs(A-(T-H[i]*0.006))):
		ans = i
		difference = abs(A-(T-H[i]*0.006))
	
print(ans+1)

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

h = list(map(int, input().split()))
res_val = abs(A - (T - h[0] * 0.006))
res_idx = 0

for i in range(1, N):
  val = abs(A - (T - h[i] * 0.0060))
  if val < res_val:
    res_val = val
    res_idx = i

print(res_idx + 1)

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

temperature_diff_list = [abs(A - (T - height * 0.006)) for height in heights]
    
print(temperature_diff_list.index(min(temperature_diff_list)) + 1)

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

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

kion = [abs(T - x * 0.006 - A) for x in H]

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

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

kion = [abs(T - x * 0.006 - A) for x in H]
kion_dic = {}
for k, i in zip(kion, range(len(H))):
    kion_dic[k] = i
a = sorted(kion_dic)
print(kion_dic[a[0]]+1)

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

tempra = [abs((T - h * 0.006) - A) for h in H]
print(tempra.index(min(tempra)) + 1)

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
height = input().split()
min=1000
minnum=0
for i in range(len(height)):
    z=int(T)-int(height[i])*0.006
    if abs(z-A)<float(min):
        min=abs(z-A)
        minnum=i+1
print(minnum)

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

temp = 10 ** 5
for i in range(n):
    diff = abs(a - (t - H[i] * 0.006))
    if diff < temp:
        temp = diff
        ans = i + 1
        
print(ans)

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = input().split()
mean_A = []
for i in range(N):
    H[i] = int(H[i])
    mean_A.append(T - H[i]*0.006 - A)
    if (mean_A[i]<0):
        mean_A[i] = -mean_A[i]
min_value = 1e+5
min_index = 0
for i in range(N):
    if (mean_A[i]<min_value):
        min_value = mean_A[i]
        min_index = i
print(min_index+1)

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

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

min = 100000000

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

print(ans)

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

def getdiff(A,T,H):
    return (A-(T-H*0.006))**2

min = 0
for i in range(len(H)):
    if getdiff(A,T,H[min])>getdiff(A,T,H[i]):
        min = i
print(min+1)