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 = list(map(int, input().split()))
hs = list(map(int, input().split()))

dif_temps = [0] * n


for i in range(n):
  dif_temps[i] = abs(t - hs[i] * 0.006 - a)

min_dif = dif_temps[0]
min_dif_index = 0

for i in range(n):
  if min_dif > dif_temps[i]:
    min_dif = dif_temps[i]
    min_dif_index = i

print(min_dif_index + 1)

Solution (Python):
n = int(input())
t,a = map(int, input().split())
h = [int(i) for i in input().split()]
c = 10**10
for j in range(n):
    if c>=abs(a-(t-h[j]*0.006)):
        c = abs(a-(t-h[j]*0.006))
        ans = j
print(ans+1)

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

best_diff = None
best_height = None
for h in H:
    avg_tmp = T - h * 0.006
    diff = abs(A - avg_tmp)

    if best_diff is None:
        best_diff = diff
        best_height = h
    elif diff < best_diff:
        best_diff = diff
        best_height = h
    else:
        pass

print([i for i, val in enumerate(H, 1)
       if val == best_height][0])

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)
ans = h.index(min(h))+1
print(ans)

Solution (Python):
n = int(input())
line = input().split()
t = int(line[0])
a = int(line[1])
temps = map(int,input().split())
temps = list(temps)
places = {}
count = len(temps)
for i in range(count):
  places[i] = abs(a - (t - 0.006 * temps[i]))
answer = min(places.items(),key = lambda x:x[1])[0] + 1
print(answer)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
def get_temp(x):
  return t - x * 0.006
best = a + 10000
ans = 0
for i in range(n):
  cur_dif = abs(get_temp(H[i]) - a)
  if cur_dif < best:
    best = cur_dif
    ans = i + 1
print(ans)

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

Solution (Python):
n = int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))
tem = 1000 * (t-a)/6
l = []

for i in h:
    temtem = i - tem
    temAbs = abs(temtem)
    l.append(temAbs)

for j in l:
    if j == min(l):
        print(l.index(j) + 1)

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

dif = 1000000 
ans = 0 

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

print(ans)

Solution (Python):
from numpy import argmin
input()
T, A = map(int, input().split())
print(argmin([abs(T - x * 0.006 - A) for x in map(int, input().split())]) + 1)

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

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

print(ans)

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


ans_l = []

for i in range(N):
    mater = H[i]
    Temp = (T - (mater*0.006))
    ans = abs(A - Temp)
    ans_l.append(ans)


ans_mini = min(ans_l)

ans_posi =[]

for h in range(N):
    if ans_l[h] == ans_mini:
        ans2 = h+1
        ans_posi.append(ans2)


for j in ans_posi:
    print(j,end="")

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

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

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

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

result = 0
best = float('inf')
for i in range(N):
    t = T - H[i] * 0.006
    if abs(A - t) < best:
        best = abs(A - t)
        result = i + 1
print(result)

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

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

Solution (Python):
def c(n):
    return abs(a - (t - (n * 0.006)))

_ = int(input())
t,a = map(int,input().split())
p = list(map(int,input().split()))

d = list(map(c, p))
s = min(d)
print(d.index(s)+1)

Solution (Python):
N=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
judge=10**18
for i,h in enumerate(H):
  if abs(a-(t-0.006*h)) < judge:
    ans=i+1
    judge=abs(a-(t-0.006*h))

print(ans)

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

def calcDiffAveTemp(height):
    temp = T - (height * 0.006)
    diffA = abs(A-temp)
    return diffA

diffs = [calcDiffAveTemp(h) for h in candidates]

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

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

plc = 0
dlt = 10000

for i in range(n):
    if abs(a - (t - ls_h[i] * 0.006)) < dlt:
        dlt = abs(a - (t - ls_h[i] * 0.006))
        plc = i

print(plc+1)

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

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

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

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

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

Solution (Python):


import numpy as np

N=int(input())
T,A=list(map(int,input().split(" ")))
H=np.asarray(list(map(int,input().split(" "))))
print(np.argmin(np.abs(A-(T-H*0.006)))+1)

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

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

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

temp = 0.006
min_t = abs(a - (t - h[0] * temp))
min = 0

for i in range(n):
    tmp = abs(a - (t - h[i] * temp))
    if tmp < min_t:
        min_t = tmp
        min = i

print(min + 1)

Solution (Python):
import numpy as np

N=int(input())
TA = list(map(int,input().split()))
T=TA[0]
A=TA[1]
H = list(map(int,input().split()))
temperature=[]
def getNearestValue(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

for i in range(N):
    temperature.append(T-H[i]*0.006)
print(getNearestValue(temperature,A)+1)

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

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

Solution (Python):
from operator import itemgetter

N = int(input())

T, A = [int(num) for num in input().split()]

high_list = [int(num) for num in input().split()]

TEMP = 0.006

d = {}
for h in high_list:
    average = T - (h * TEMP)
    absolute = abs(A - average)
    d[h] = absolute

sorted_dict = sorted(d.items(), key=itemgetter(1))
ans = sorted_dict[0][0]

print(high_list.index(ans) + 1)

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

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

mtemp = math.fabs(A - (T - Hn[0] * 0.006))
midx = 0
for idx, v in enumerate(Hn):
    tmp = math.fabs(A - (T - v * 0.006))
    if tmp < mtemp:
        mtemp = tmp
        midx = idx

print(midx + 1)

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

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

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

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()
t,a = MAP()
h = MAP()

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

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((t-(h[i]*6/1000))-a))
  
x=li.index(min(li))
print(x+1)

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
res = 0
t = float("inf")
for i in range(N):
  if t > abs(T - 0.006 * H[i] - A):
    res = i + 1
    t = abs(T - 0.006 * H[i] - A)
print(res)

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

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

Solution (Python):

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

l = [0] * N

for i in range(N):
    l[i] = abs((T - H[i]*0.006)-A)

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

Solution (Python):
N = int(input())
T,A = map(int, input().split())
l = list(map(int, input().split()))
d = 100000000000000000
a = 0

for i in range(N):
    x = abs(A-(T-l[i]*0.006))
    if x < d:
        d = x
        a = i+1
print(a)

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


l = [0]*n

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




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

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

ans = []
for i in range(N):
  a_t = T - (H[i] * 0.006)
  Abs = abs(A - a_t)
  ans.append(Abs)

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

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

list2 = []

for i in range(n):
    list2.append(abs(a-(t-list1[i]*0.006)))

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

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

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

t = 1000000007
ans = 1000000007
for i in range(N):
    u = abs(A - (T - H[i] * 0.006))
    if t > u:
        t = u
        ans = i + 1
print(ans)

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

for i, h in enumerate(H):
    if abs((T - 0.006 * H[ans]) - A) > abs((T - 0.006 * h) - A):
        ans = i

print(ans + 1)

Solution (Python):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k 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()))
tofh = [(t - x * 0.006) for x in h]
import math
deltaoft = [math.fabs(tofx - a) for tofx in tofh]
print(deltaoft.index(min(deltaoft)) + 1)

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

Solution (Python):

n = int(input())
t, a = [int(s) for s in input().split()]
h = [int(s) for s in input().split()]
difference = [abs(a - (t - i * 0.006)) for i in h]

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
Hs = [int(H) for H in input().split()]
min_diff = 10e9
ans = 0
for i, H in enumerate(Hs):
    T_at_H = T - H*0.006
    diff = abs(A - T_at_H)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1
print(ans)

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

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[int(x) for x in input().split()]
answer=0
deff=float('inf')
for i in range(N):
  deff=min(deff,abs(H[i]-(T-A)/0.006))
  if deff==abs(H[i]-(T-A)/0.006):
    answer=i+1
print(answer)

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

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

a_L = []
for val in h_L:
    temp = t-val*0.006
    x = abs(a-temp)
    a_L.append(x)

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

Solution (Python):
def main():
  N = int(input())
  T, A = map(lambda i: int(i), input().split(' '))
  H = list(map(lambda i: int(i), input().split(' ')))
  diff = -1
  answer = 0
  for i in range(N):
    t = T - H[i] * 0.006
    if diff == -1 or abs(A - t) < diff:
      diff = abs(A - t)
      answer = i + 1
  print(answer)

main()

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
mi, ami = float("inf"), -1
for i, h in enumerate(H, 1):
    t = abs(T - 0.006 * h - A)
    if t < mi:
        mi = t
        ami = i
print(ami)

Solution (Python):
N=int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
lis =[]
for i,h in enumerate(H):
    lis.append(abs(T-h*0.006-A))

print(1+min(enumerate(lis), key=lambda x:x[1])[0])

Solution (Python):

import sys


def solve(N: int, T: int, A: int, H: "List[int]"):
    tmp = 10**6
    for i,h in enumerate(H):
        if tmp > abs(A - T + h*0.006):
            tmp = abs(A - T + h*0.006)
            ans = i + 1
    print(ans)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    T = int(next(tokens))  
    A = int(next(tokens))  
    H = [int(next(tokens)) for _ in range(N)]  
    solve(N, T, A, H)

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] = T - H[i] * 0.006 - A
  if H[i] < 0:
    H[i] = (-1) * H[i]
M = -1
for i in range(N):
  if H[i] == min(H):
    M = i+1
print(M)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
List = list(map(int,input().split()))
div = 100000
for i in range(len(List)):
    heat = T - List[i] *0.006
    if(div>abs(A - heat)):
        div = abs(A -heat)
        ans = i + 1
print(ans)

Solution (Python):
import numpy as np

n = int(input())
t, a = [int(x) for x in input().split()]
candidates = [int(x) for x in input().split()]

temperatures = [t - c*0.006 for c in candidates]
temp_diff = [abs(a - t) for t in temperatures]
print(np.argmin(temp_diff)+1)

Solution (Python):

import sys










def main():
    n, T, A, *h = (int(x) for x in sys.stdin.read().split())

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




if __name__ == "__main__":
    main()

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

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

def temperature(T, x):
  temp = T - 0.006 * x
  return temp

for i in range(N):
  ans_list.append(abs(temperature(T, H[i]) - A))

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

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

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

temp = T - H[0] * 0.006 - A
ans = 0
for i, height in enumerate(H):
    B = T - height * 0.006 - A
    if abs(T - height * 0.006 - A) <= abs(temp):
        temp = T - height * 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()))
s = [abs(a - t + x*0.006) for x in h]
print(s.index(min(s))+1)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

minabs = 10 ** 10
resi = 0

for i, h in enumerate(H):
    res = abs(A - (T-h*0.006))
    if minabs > res:
        resi = i
        minabs = min(minabs, res)

print(resi+1)

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

x = 10**12
res = 0

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

print(res)

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

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
t,a = [int(x) for x in stdin.readline().rstrip().split()]
li = list(map(int,stdin.readline().rstrip().split()))
lin = []

for i in li:
    lin.append(abs(a-(t-i*0.006)))

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n=int(input())
    t,a=map(int,input().split())
    hh=list(enumerate(map(int,input().split())))
    print(min(hh, key=lambda x:abs(t-a-x[1]*0.006))[0]+1)

main()

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

minn = 10000
j = 0
for i in h:
	num = t - i * 0.006
	j += 1
	if abs(num-a) < minn:
		minn = abs(num-a)
		ans = j
print (ans)

Solution (Python):

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

tmp = T - H*0.006
dif = abs(tmp-A)
ind = np.argmin(dif)

print(ind+1)

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

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

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

for h in H:
    ls.append(abs(a-(t-h*0.006)))

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

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=0
count=10000000000
for j in range(n):
    if abs((t-0.006*h[j])-a)<count:
        count=abs((t-0.006*h[j])-a)
        ans=j
print(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(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()))
t = [abs(a-(T-x*0.006)) for x in h]
print(t.index(min(t))+1)

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

print(min((abs(T - h*0.006 - A), i) for i, h in enumerate(H))[1] + 1)

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

for i,h in enumerate(H):
    temp = T - h * 0.006
    if abs(temp-A) < minTemp:
        minTemp = abs(temp-A)
        place = i+1
print(place)

Solution (Python):
def solve():
    N = input()
    T,A = map(int, input().split())
    temperature = lambda x: T-0.006*x
    H = list(map(int, input().split()))
    diff_h = abs(A-temperature(H[0]))
    ret = 0
    for i,h in enumerate(H):
        if abs(A-temperature(H[i])) <= diff_h:
            diff_h = abs(A-temperature(H[i]))
            ret = i
            
    print(ret+1)
    
solve()

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

distFromA = list(map(lambda x: abs((T - x * 0.006) - A), H))

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

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

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

near = abs(a-(t-h[0]*0.006))
ind = 1
for i in range(1,n):
	ave = t-h[i]*0.006
	if near > abs(a-ave):
		ind = i+1
		near = abs(a-ave)

print(ind)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
diff = list(map(lambda x: abs(x-((t-a)/0.006)),h))
mini = min(diff)
for i in range(n):
  if mini == diff[i]:
    print(i+1)

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

Solution (Python):
import numpy as np

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

H = np.array(H)
H_t = abs(T - H * 0.006 - A)
H_min_ind = [n for n, v in enumerate(H_t) if v == min(H_t)]

print(H_min_ind[0]+1)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=1
tmp=float('inf')
for i in range(n):
    if abs(tmp-a)>abs(t-h[i]*0.006-a):
        ans=i+1
        tmp=t-h[i]*0.006
    
print(ans)

Solution (Python):
N = int(input())
T,A=[int(x) for x in input().split()]
H = [int(x) for x in input().split()]
ans=1
Temp = abs(T -A - 0.006*H[0])

for i in range(N):
    _Temp = abs(T -A - 0.006*H[i])
    if Temp > _Temp:
        Temp = _Temp
        ans=i+1

print(ans)

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 = [int(i) for i in input().split()]
H =[int(i) for i in input().split()]

 
HH=[abs(A-(T-h*0.006))for h in H]  
print(int(HH.index(min(HH))+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((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()))

tar=1000*(t-a)/6
best=10**5
best_i=-1
for i in range(len(H)):
  dif=abs(tar-H[i])
  if dif<best:
    best=dif
    best_i=i
print(best_i+1)

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

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

T=[abs(a-(t-i*0.006)) for i in h]

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

Solution (Python):
n = int(input())
x,y = map(int,input().split())
a = list(map(int,input().split()))

aa = float('inf')
ans = 0

for i in a:
    avg = x - i * 0.006
    dif = abs(y-avg)
    aa = min(aa,dif)
    if dif <= aa:
        ans = a.index(i)
        
print(ans+1)

Solution (Python):
import numpy as np

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


h = np.array(h)
at = t - h * 0.006
diff = abs(a - at)

print(np.argmin(diff) + 1)

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

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

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

mindist = 1e5
ans = -1

for i in range(N):
	curdist = abs(T - H[i] * 0.006 - A)
	if mindist > curdist:
		mindist = curdist
		ans = i

print(ans + 1)

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

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

Solution (Python):
def main(n, t, a, h):
    def formula(t, x): return t - x * 0.006
    res = []

    for _h in h:
        res.append(abs(a - formula(t, _h)))

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


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

    main(n, t, a, h)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
tmp = []
for i in range(N):
    H[i] = abs((T-H[i]*0.006)-A)
ans = min(H)
for j in range(N):
    if H[j] == ans:
        ans = j+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()]

best = t - h[0] * 0.006
ans = 0

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

Solution (Python):
import numpy as np

def find_nearest(array, value):
    min_value = np.abs(max(array))
    min_idx = 0
    j = 0
    idx = np.abs(value - np.asarray(array)).argmin()

    
     
      
       
        
    return idx + 1

input_N = input()
input_two = input().split()
input_three = input().split()

N = int(input_N)
T = int(input_two[0])
A = float(input_two[1])

H_f = [float(s) for s in input_three]
j = 0
degree_list = list(range(j))
for i in H_f:
    degree_list.append(T-i*0.006)

print(find_nearest(degree_list, A))

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

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

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

diff_list = []

cur = 0

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

print(cur)

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

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

print(index)

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
diff = 1000
for i, hi in enumerate(h):
    hi_temp = abs(a - (t - hi*0.006))
    if hi_temp < diff:
        diff = hi_temp
        ans = i + 1
print(ans)

Solution (Python):
import bisect


def palace():
    def average_temperature(height):
        return t - (height * 0.006)
    
    def get_key_from_value(dict, value):
        for k, v in dict.items():
            if v == value:
                return k
    
    n = int(input())
    t, a = map(float, input().split())
    
    h = list(map(int, input().split()))
    h_dict = {}
    for i in range(n):
        h_dict[i + 1] = average_temperature(h[i])
    
    h_sorted = sorted(h, reverse=True)
    temperatures = [average_temperature(height) for height in h_sorted]
    
    index = bisect.bisect_left(temperatures, a)
    if index - 1 >= 0 and index <= n - 1:
        choices = [temperatures[index - 1], temperatures[index]]
        abses = [abs(a - choices[0]), abs(a - choices[1])]
        if abses[0] >= abses[1]:
            print(get_key_from_value(h_dict, choices[1]))
        else:
            print(get_key_from_value(h_dict, choices[0]))
    else:
        if index - 1 >= 0:
            choice = temperatures[index - 1]
            print(get_key_from_value(h_dict, choice))
        if index <= n - 1:
            choice = temperatures[index + 1]
            print(get_key_from_value(h_dict, choice))


if __name__ == '__main__':
    palace()

Solution (Python):

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

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