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()))
tans = 1000
nans = 0
for i in range(N):
    ans = abs(A - (T - (H[i] * 0.006)))
    if ans == 0:
        print(i+1)
        exit()
    elif ans < tans:
        tans = ans
        nanns = i
print(nanns+1)

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

x = t - l[0] * 0.006
ans = []
for x in l:
    x = t - x * 0.006
    y = a - x
    ans.append(abs(y))

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

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

x = t - l[0] * 0.006
tmp = []
for x in l:
    x = t - x * 0.006
    tmp.append(x)

ans = []

for z in tmp:
    y = a - z
    ans.append(abs(y))

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

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

m=float('inf')
for i in range(n):
  if abs(a-t+0.006*H[i])<m:
    m=abs(a-t+0.006*H[i])
    ans=i
print(ans+1)

Solution (Python):
from typing import List


def answer(n: int, t: int, a: int, hs: List[int]) -> int:
    import sys
    
    result = 0
    temperature_difference = sys.maxsize
    
    for i, h in enumerate(hs, start=1):
        temp = abs(a - (t - h * 0.006))
        if temp < temperature_difference:
            temperature_difference = temp
            result = i

    return result


def main():
    n = int(input())
    t, a = map(int, input().split())
    hs = list(map(int, input().split()))
    print(answer(n, t, a, hs))


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

Solution (Python):
import numpy as np

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

t = t*1000
a = a*1000
npli = np.array(li)
npli = t-npli*6

res = npli[0]
res_num = 1
for i in range(n):
    
    if abs(a-res) > abs(a-npli[i]):
        res = npli[i]
        res_num = i+1
print(res_num)

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

diff = []
for height in h:
    temp = t - (height * 0.006)
    diff.append(abs(a - temp))

minimum = min(diff)
ans = diff.index(minimum) + 1

print(ans)

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

Solution (Python):
def ave_ten(T,x):
    return T - x*0.006

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

min_ten = 9999999999

for i in range(len(li)):
    if abs(min_ten - A) > abs(ave_ten(T,li[i])-A):
        min_ten = ave_ten(T,li[i])
        min_in = i+1

print(min_in)

Solution (Python):
a = int(input())
b,c = map(int,input().split())
d = list(map(int,input().split()))
e = []
f = []
ans = 10**9
for i in d:
  e.append(b-0.006*i)
for j in e:
  f.append(abs(c-j))
print(f.index(min(f))+1)

Solution (Python):

import sys
input=sys.stdin.readline
import decimal

def main():
    numbers=[]
    n = int(input())
    t,a = map(int,input().split())
    numbers=list(map(int,input().split()))
    dp=[]
    hensu=decimal.Decimal('0.006')
    for number in numbers:
        tmp=abs(t-number*hensu-a)
        dp.append(tmp)
    answer=dp.index(min(dp))+1
    print(answer)

if __name__=="__main__":
    main()

Solution (Python):
n = int(input())
t, a = (int(i) for i in input().split())
list_h = [int(i) for i in input().split()]
tmp = 999
ans = 0
for i in range(0, n):
    if tmp > abs((t - list_h[i] * 0.006) - a):
        tmp = abs((t - list_h[i] * 0.006) - a)
        ans = i
print(ans + 1)

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

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

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

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



for i in range(N):
    TMP = T - (H[i] * 0.006)
    if A >= 0:
        ABS = abs(TMP - A)
    else:
        ABS = abs(A - TMP)
    M.append(ABS)
            
MIN = min(M)
for i in range(len(M)):
    if MIN == M[i]:
        print(i+1)

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

dt = 1000
ans = 0
for i in range(len(h)):
    tmp = float(t) - 0.006 * h[i]
    if dt > abs( a - tmp ):
        dt = abs( a - tmp )
        ans = i + 1

print(ans)

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

dt = 10000000
ans = 0
for i in range(len(h)):
    tmp = float(t) - 0.006 * h[i]
    if dt > abs( a - tmp ):
        dt = 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()))
h=abs(A-(T-(H[0]*0.006)))
m=1
for i in range(1,N):
    if h>abs(A-(T-(H[i]*0.006))):
        h=abs(A-(T-(H[i]*0.006)))
        m=i+1
print(m)

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

diff = []
for i in H:
	diff.append(abs(A-T+i*0.006))

diffmin = diff[0]
ans = 0
for i in range(N):
	if diffmin > diff[i]:
		diffmin = diff[i]
		ans = i
print(ans+1)

Solution (Python):
import numpy as np

def palace():
    
    N = int(input())
    T, A = np.array(input().split(), dtype="int")[:2]
    H = [int(i) for i in input().split()]
    
    min_dif = 10000
    place = 0
    for i in range(N):
        temp = T - H[i] *0.006
        dif = abs(A-temp)
        
        
        if min_dif >= dif:
            min_dif = dif
            place = i+1
    
    print(place)
    
    
palace()

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n = int(input())
    t, a = Input()
    h = Input()

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

    print(h.index(min_h)+1)


main()

Solution (Python):
def calc(T, x):
  return T - x * 0.006

N = int(input())
T, A = map(int, input().split())
L = list(map(int, input().split()))
l = []
for i in L:
  l.append(abs(A - calc(T, i)))

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

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

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

    mini = 10**10
    ans = 0
    for i, x in enumerate(h):
        c = t - x * 0.006
        if abs(a - c) < mini:
            mini = abs(a - c)
            ans = i+1

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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

h_list = map(int, input().split())

temp_list = [(i, abs(A - (T-x*0.006))) for i, x in enumerate(h_list, 1)]

ans = min(temp_list, key=lambda x: x[1])

print(ans[0])

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

Solution (Python):
n = int(input())
tempre, a = list(map(int, input().split()))
heights = list(map(int, input().split()))

min_abs = 10**6
ans = -1
for i, h in enumerate(heights):
    t = tempre - 0.006 * h
    if abs(t-a) < min_abs:
        ans = i+1
        min_abs = abs(t-a)
print(ans)

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

Solution (Python):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
p = 9999
m = 9999
for i in range(n):
  tem = t - (H[i]*0.006)
  dist = abs(a-tem)
  if dist < m:
    p = H[i]
    m = dist
print(H.index(p)+1)

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

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

cnt = []
for h in H:
    a = T-(h*0.006)
    c = abs(A-a)
    cnt.append(c)
    
ans = cnt.index(min(cnt))+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):
	l.append(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=0
anst=10e7
for i,j in enumerate(h):
    avg=t-j*0.006
    if anst>abs(a-avg):
        anst=abs(a-avg)
        ans=i+1
print(ans)

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

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

a -= t
a *= 1000

ans = 0
diff = abs(a + h[0] * 6)

for i in range(1, n):
    if abs(a + h[i] * 6) < diff:
        ans = i
        diff = abs(a + h[i] * 6)

print(ans + 1)

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

p=[]

for i in range(n):
  q=(t-0.006*h[i])
  p.append(abs(q-a))

print(p.index(min(p))+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)
temp = T-H*0.006
res = np.abs(temp-A)

print(np.argmin(res)+1)

Solution (Python):

url = "https://atcoder.jp//contests/abc113/tasks/abc113_b"

def main():
    input()
    t, a = list(map(int, input().split()))
    syuto = list(map(int, input().split()))
    tempture = []
    for s in syuto:
        tempture.append(abs(a - (t - s * 0.006)))
    print(tempture.index(min(tempture))+1)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

_min = 10 ** 7
ans = None
for i, v in enumerate(h):
    c = abs((t - 0.006 * v) - a)
    if c < _min:
        _min = c
        ans = i + 1
print(ans)

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

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
a1 = []
a2 = []
for i in range(n):
    tt = abs((t - h[i]*0.006) - a)
    a1.append(tt)
    a2.append(i+1)
ans = {}
ans.update(zip(a1, a2))
small = sorted(a1, reverse=False)[0]
print(ans[small])

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

min_abs = 100000
index = 0
for i in range(n):
    temp = t - h[i] * 0.006
    if abs(a - temp) < min_abs:
        min_abs = abs(a - temp)
        index = i
print(index + 1)

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

mini = float('inf')
res = 0

for i in range(len(H)):
    spot = T - H[i] * 0.006
    if abs(spot - A) < mini:
        mini = abs(spot - A)
        res = i+1

print(res)

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

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

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

result_score = 10000
result_num = 0

for num, h in enumerate(H, 1):
    temp = T - h * 0.006
    score = abs(A-temp)

    if result_score >= score:
        result_score = score
        result_num = num

print(result_num)

Solution (Python):
N = int (input ())
T,A = map (int, input ().split ())
S = 1000000
l = [int (x) for x in input().split()]
for i in range (len(l)):
  s = abs((T-l[i]*0.006)-A)
  if s < S:
    S = s
    ans = i
print (ans+1)

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

atlist = []
for i in h:
    atlist.append(abs(a - (t - i * 0.006)))

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

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

for i in range(n):
    x = t - h[i] * 0.006
    if a >= x:
        TMP = a - x
        tmp.append(TMP)
    else:
        TMP = x - a
        tmp.append(TMP)

for i in range(n):
    if tmp[i] == min(tmp):
        print(i+1)

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

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

res = 0
val = 10**5
for i in range(n):
    if (v := abs(a - (t - h[i]*0.006))) < val:
        val = v
        res = i+1
print(res)

Solution (Python):
import sys

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

    dif = sys.maxsize
    ans = -1
    for i in range(N):
        t = T - H[i] * 6 / 1000
        if abs(t - A) < dif:
            dif = abs(t - A)
            ans = i + 1
    print(ans)

if __name__ == "__main__":
    solve()

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

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

tmp = float("inf")
ans = 0

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

print(ans)

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    T, A = map(int, readline().split())
    H = list(map(int, readline().split()))
    X = map(lambda x: abs(A - (T - 0.006 * x)), H)

    x_min = INF
    ans = -1

    for i, x in enumerate(X, 1):
        if x < x_min:
            ans = i
            x_min = x

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
now = 99999
ans = 0
for i in range(N):
  tem = T - H[i] * 0.006
  if abs(tem - A ) < now:
    now = abs(tem - A)
    ans = i+1
print(ans)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
ans=1000000000000
for i in range(N):
    temp=T-H[i]*0.006
    if abs(temp-A)<ans:
        ans=abs(temp-A)
        p=i+1
print(p)

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

num=10**5
ans=0

for i,j in enumerate(l):
  tem=abs(a-(t-j*0.006))
  num=min(num,tem)
  if num==tem:
    ans=i+1
    
print(ans)

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

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

s = 10000

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = (10**9, -1)
for i in range(N):
    tmp = T - 0.006 * H[i]
    if abs(tmp - A) < ans[0]:
        ans = (abs(tmp - A), i + 1)
print(ans[1])

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=0
res=float('inf')
for i in range(n):
  if abs(t-h[i]*float(0.006)-a)<res:
    res=abs(t-h[i]*float(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()))
ans=100000000000000
ans1=-1
for i in range(n):
    if abs(a-(t-h[i]*0.006))<ans:
        ans=abs(a-(t-h[i]*0.006))
        ans1=i+1
print(ans1)

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

ans = 0
temp = 1000000000000

for i in range(n):
  if temp > abs(a*1000-1000*t+h[i]*6):
    temp = abs(a*1000-1000*t+h[i]*6)
    ans = i+1

print(ans)

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

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

min_value = abs(A - (T - H[0] * 0.006))
min_index = 1
for i in range(1, len(H)):
    if(min_value > abs(A - (T - H[i] * 0.006))):
        min_value = abs(A - (T - H[i] * 0.006))
        min_index = i+1
print(min_index)

Solution (Python):
import numpy as np
N = int(input())
T, A = (int(x) for x in input().split())

result = [int(N) for N in input().split()]

list = []
for num in range(N):
    list.append(abs(T-0.006*result[num]-A))

m = np.argmin(list) + 1

print(m)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
m=10000
h=list(map(int,input().split()))
for i in range(n):
  x=t-h[i]*0.006
  m=min(m,abs(x-a))

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

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

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

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

now = ts[0]
ans = 1
for i in range(n):
    if ts[i] < now:
        ans = i+1
        now = ts[i]

print(ans)

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

temp = 10**6
res = 0
for i in range(n):
    dt = abs((t - al[i]*0.006)-a)
    if temp >= dt:
        temp = dt
        res = i+1

print(res)

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

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

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

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

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

k = []

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

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

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

ans = 0
l = a + 10000

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

print(ans)

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

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

ans = 0
diff = float("inf")

for i, height in enumerate(h):
    temp = T - 0.006 * height
    if diff > abs(A - temp):
        diff = abs(A - temp)
        ans = i + 1

print(ans)

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = 0
m = A + 1000
for i in range(N):
  d = abs(T - H[i] * 0.006 - A)
  if m > d:
    m = d
    ans = i + 1
print(ans)

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

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

Solution (Python):


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


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

for i, h in enumerate(H_list):
    if i==0:
        diff_min = get_diff(T, A, h)
        diff_min_idx = i + 1
    else:
        diff = get_diff(T, A, h)
        if diff_min > diff:
            diff_min = diff
            diff_min_idx = i + 1 

print(diff_min_idx)

Solution (Python):



def main():
    n = int(input())
    t, a = map(int, input().split())
    li = list(map(int, input().split()))
    ans_v = float("inf")
    ans_i = 0
    for i, x in enumerate(li):
        temperature = abs(a - (t - x * 0.006))
        if ans_v > temperature:
            ans_v = temperature
            ans_i = i + 1
    print(ans_i)


if __name__ == "__main__":
    main()

Solution (Python):



def main():
    import numpy as np

    N, T, A, *H = map(int, open(0).read().split())
    print(np.argmin(np.abs(A - (T - np.array(H) * 0.006))) + 1)


main()

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

temperature_diff_list = []
for height in height_list:
  temperature = T - height*0.006
  temperature_diff = temperature - A if temperature > A else A - temperature 
  temperature_diff_list.append(temperature_diff)

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

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

diff = list(map(lambda x: abs(A - (T - x * 0.006)), Hs))
idx = diff.index(min(diff))
print(idx + 1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
min = 1e8
ans = None

for i in range(N):
    temp = T - H[i]*0.006
    diff = abs(A-temp)
    if diff < min:
        min = diff
        ans = i

print(ans + 1)

Solution (Python):
n = int(input())
t, a = map(float,input().split())
h = list(map(int,input().split()))
l = []
j = 0

for i in range(n):
    l.append(abs(a-(t-h[j]*0.006)))
    j+=1

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
ret, tmp_temp = 1, h[0]
for i, height in enumerate(h):
    x = t - height*0.006
    if abs(a-x) <= abs(a-tmp_temp):
        tmp_temp = x
        ret = i+1
print(ret)

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

tmp = 10**7
for i in range(n):
    c = abs(a-(t-h[i]*0.006))
    if c < tmp:
        tmp = c
        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 h:
  l.append(abs(t-i*0.006 - a))
print(l.index(min(l))+1)

Solution (Python):
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
t, a = [int(num) for num in lines.pop(0).split(" ")]
h_list = [int(num) for num in lines.pop(0).split(" ")]
ans = 1
prev_dif = sys.maxsize
for index, h in enumerate(h_list, 1):
    dif = abs((t - h * 0.006) - a)
    if dif < prev_dif:
        prev_dif = dif
        ans = index
print(ans)

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]

ans = 0
mindt = 100000
for i in range(N):
    if abs(A-temp[i])<mindt:
        ans=i+1
        mindt=abs(A-temp[i])
        
print(ans)

Solution (Python):
n=int(input())
x,k=map(int,input().split())
l=list(map(int,input().split()))
m=100000000000000
u=-1
for i in range(n):
    d=x-l[i]*0.006
    if(abs(d-k)<m):
        m=abs(d-k)
        u=i+1
print(u)

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

min_degree = 10000

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

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

n = 0
t_best = 100000
for i in range(N):
    if abs(A - (T-H[i]*0.006)) < t_best:
        t_best = abs(A - (T-H[i]*0.006))
        n = i+1
    
print("{}".format(n))

Solution (Python):
from bisect import *
N = int(input())
T, A = map(int, input().split())
H = []
for i, h in enumerate(map(int, input().split())):
    H.append((T-h*0.006, i))
H.sort()
H2 = [h for h, _ in H]
i = bisect_left(H2,A)
if i==N:
    print(H[-1][1]+1)
elif abs(H[i-1][0]-A) > abs(H[i][0]-A):
    print(H[i][1]+1)
else:
    print(H[i-1][1]+1)

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

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

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

def temp(x):
    y = abs(t - x*0.006 - a)
    return y
t_dif = list(map(temp, h_list))
t_min = min(t_dif)
t_index = int(t_dif.index(t_min))
print(t_index+1)

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

Solution (Python):
import numpy as np
n = int(input())
temp0, avg = list(map(int, input().split(' ')))
height = list(map(int, input().split(' ')))

diff = [0]*n
for i in range(n):
  temp = temp0 - 0.006*height[i]
  diff[i] = abs(avg - temp)
print(np.argmin(diff)+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
Hls = list(map(int,input().split()))
mabs = 10**5+1
for i in range(N):
    if abs(A-(T-Hls[i]*0.006)) <= mabs:
        mabs = abs(A-(T-Hls[i]*0.006))
        ans = i
    else:
        pass
print(ans+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H_list = list(map(int,input().split()))
ans = 0
temp = 10 ** 6
for i in range(N):
    t = T - H_list[i] * 0.006
    a = abs(A-t)
    if a < temp:
        ans = i + 1
        temp = a
print(ans)

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

temp_list = [abs(t - i * 0.006 - a) for i in h]
min_diff = min(temp_list)
for i, temp in enumerate(temp_list):
    if temp == min_diff:
        print(i + 1)
        break

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

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


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