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):
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()])
print(np.argmin(np.abs(T - H*0.006 - A))+1)

Solution (Python):
n = int(input())
t, a = map(lambda x: int(x) * 1000, input().split())
h = list(map(lambda x: t - int(x) * 6, input().split()))
print(min(range(n), key=lambda x: abs(h[x]-a)) + 1)

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

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

Solution (Python):
def resolve():
    N = int(input())
    T, A = list(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)

    return

resolve()

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

dif_list = []

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

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

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

dif_list = []
answer = 0

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

print(answer)

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

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
mylist=list(map(int,input().split()))
mymin=10**6
index=0

for i in range(N):
  if(mymin>abs(A-(T-0.006*mylist[i]))):
    mymin=abs(A-(T-0.006*mylist[i]))
    index=i
print(index+1)

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

Solution (Python):
N = int(input())
T,A= map(int,input().split())
H = list(map(int,input().split()))
dif=100000
ans=0
for i in range (len(H)):
    a = abs(A-(T-H[i]*0.006))
    dif=min(a,dif)
    if dif==a:
        ans=i+1

print(ans)

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

temp = [t-hh*0.006 for hh in h]

dist = float('inf')
ans = -1
for i, t in enumerate(temp):
    if abs(t-a) <= dist:
        ans = i+1
        dist = abs(t-a)
print(ans)

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

Solution (Python):
import sys
import math
import itertools
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
import bisect

N = i()
T,A = I()
H = l()
h = copy(H)
H.sort()
B = (T-A)/0.006
i = bisect.bisect_left(H,B)
if  abs((T-H[i-1]*0.006)-A)> abs(A-(T-H[i]*0.006)):
    print(h.index(H[i])+1)
else:
    print(h.index(H[i-1])+1)

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

import numpy as np

import math

if __name__ == '__main__':
    n = int(input())
    b, c = map(int, input().split())
    list = []
    min = 10000000000
    d = [int(i) for i in input().split()]
    c = c * 1000

    for i in d:
        a = b *1000 - i * 6
        diff = 0
        if (a > 0 and c > 0) or (a < 0 and c < 0):
            diff = abs(c - a)
        else:
            diff = abs( a) +abs(c)
        list.append(diff)
        if min > diff:
            min = diff
    print(list.index(min) + 1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
s=list(map(int,input().split()))
l=[]
x=(t-a)//0.006

for i in range(n):
    l.append(abs(x-s[i]))
    
y=l.index(min(l))
print(y+1)

Solution (Python):

def main():
    n = int(input())
    t, a = map(int, input().split())
    ans = 0
    x = 100000
    for i, h in enumerate(map(int, input().split())):
        temp = abs(a - (t - h * 0.006))
        if temp < x:
            x = temp
            ans = i+1

    print(ans)

main()

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

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

tmp = 1001001001
ans = 0
for i in range(n):
    ab = t - lis[i]*0.006
    
    if abs(ab - a) < abs(tmp - a):
        ans = i
        tmp = ab
        
print(ans+1)

Solution (Python):
def actual(n, t, a, H):
    avg_temperture = lambda height: t - (height * 0.006)
    diff_a = lambda avg_temperture: abs(avg_temperture - a)

    temperature_diffs = [diff_a(avg_temperture(h)) for h in H]

    return temperature_diffs.index(min(temperature_diffs)) + 1

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

print(actual(n, t, a, H))

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

ans_ind = 0
ans_d = 1e9

for i, h in enumerate(H):
    d = abs(T - h * 0.006 - A)
    if d < ans_d:
        ans_d = d
        ans_ind = i + 1
print(ans_ind)

Solution (Python):
import math
from collections import deque
from collections import defaultdict

import itertools as it


def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq
def get_sieve_of_eratosthenes(n):
	
	data = [0,0,0]
	for i in range(3,n+1,2):
		data.append(i)
		data.append(0)
	for i in range(len(data)):
		interval = data[i]
		if interval!=0:
			for j in range(i+interval,n-1,interval):
				data[j] = 0
	
	ans = data[:]
	return ans

n = readInt()
t,a = readInts()
h = readInts()

ans = 1
ran = float("inf")

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

print(ans)

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

Solution (Python):
def mi():
    return map(int, input().split())

def main():
    N = int(input())
    T, A = mi()
    H = list(mi())
    tmps = [abs(T-h*0.006-A) for h in H]
    print(tmps.index(min(tmps))+1)

if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
import math
def ip():return int(input())
def imp():return map(int,input().split())
def impstr():return map(str,input().split())
def limp():return list(map(int,input().split()))

n=ip()
t,a=imp()
h=limp()
index=0
ans=10**18
for i in range(n):
    if abs(a-(t-h[i]*0.006))<ans:
        ans=abs(a-(t-h[i]*0.006))
        index=i
print(index+1)

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

sa = [abs(A - (T - 0.006*hi)) for hi in H]

mn = 1000
ans = -1
for i in range(N):
  if sa[i] < mn:
    ans = i+1
    mn = sa[i]
    
print(ans)

Solution (Python):
a = int(input())
x  = 0
lists = []
ass =[]

b,standard = map(int,input().split())

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

for i in range(a):
    lists.append(abs(b - elev[i] * 0.006 - standard))

m = min(lists)
mindex = lists.index(m)
print(mindex + 1)

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

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

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

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

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

def tem(hi):
  return t-(hi*0.006)
good=2000000000
num=-1
i=1
for hi in h:
  x=abs(tem(hi)-a)
  if x<good:
    good=x
    num=i
  i+=1
  
print(num)

Solution (Python):
import bisect
import copy
from decimal import Decimal
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
L = copy.copy(H)
H.sort()
s = Decimal((T-A)/0.006)
B1 = bisect.bisect_left(H,s)
B2 = B1-1
if B1 == 0:
    print(L.index(H[B1])+1)
elif B1 == N:
    print(L.index(H[B2])+1)
elif H[B1]-s < s-H[B2]:
    print(L.index(H[B1])+1)
else:
    print(L.index(H[B2])+1)

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

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

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

for height in l:
  deltatemperature.append(abs(T- height* 0.006- A))
  
m = min(deltatemperature)
mindex = deltatemperature.index(m)
print(mindex+ 1)

Solution (Python):


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

Tmp = [T - H[i] * 0.006 for i in range(N)]

tmp = 10 ** 9
ans = -1

for i in range(len(Tmp)):
    if tmp > abs(A-Tmp[i]):
        tmp = abs(A-Tmp[i])
        ans = i

print(ans+1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
hs=list(map(int,input().split()))
n=0
m=float('inf')
for i,h in enumerate(hs, start=1):
    x=abs(a-(t-h*0.006))
    if m>x:
        m=x
        n=i
print(n)

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

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

Solution (Python):

import numpy as np
def getNearestIndex(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

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

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

resultNum = getNearestIndex(result, A)
print(resultNum + 1)

Solution (Python):

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

b = t - h[0]*0.006
ans = 1

for i, name in enumerate(h, 1):
  temp = t - name*0.006
  if abs(a - temp) < abs(a - b):
    ans = i
    
    b = temp
print(ans)

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

d = sorted(d.items(), key=lambda x:x[1])
print(d[0][0] + 1)

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

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))
ll = [t-h*0.006-a for h in hl]
ans = 1
dd = 1000000000
for i in range(n):
    if ll[i] >= 0 and ll[i] < dd:
        ans = i+1
        dd = ll[i]
    elif ll[i] < 0 and -ll[i] < dd:
        ans = i+1
        dd = -ll[i]
    else:
        pass

print(ans)

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

h=list(map(int,input().split()))
mn=10**5

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

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

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

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

near_i = -1
min_diff = 10**6 * 0.006
for i, h in enumerate(H):
    temp = T - h * 0.006
    diff = abs(A - temp)
    if diff < min_diff:
        min_diff = diff
        near_i = i
print(near_i+1)

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

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

Solution (Python):
import sys
N = int(sys.stdin.readline().rstrip())
T, A = map(int, sys.stdin.readline().rstrip().split())
H = list(map(int, sys.stdin.readline().rstrip().split()))
res = 10**10
ans = -1
for i, h in enumerate(H):
    if res > abs(A - (T - h * 0.006)):
        ans = i
        res = abs(A - (T - h * 0.006))
print(ans + 1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
x = float('inf')
for i in range(len(H)):
    tmp = t - H[i]*0.006
    tmp2 = abs(a-tmp)
    if tmp2 < x:
        ans = i+1
        x = tmp2

print (ans)

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

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

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

if __name__ == '__main__':
    solve()

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

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

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

min_index = 0
min_temp = 0
for i, t in enumerate(temparature):
    if i == 0:
        min_temp = t
    else:
        if min_temp > t:
            min_index = i
            min_temp = t
print(min_index + 1)

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

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

ans = min(H.items(), key=lambda x:x[1])
print(ans[0]+1)

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

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    n = i_input()
    t, a = i_map()
    num_list = i_list()

    abs_num = INF
    ans = 0

    for i in range(n):
        tmp = t - num_list[i] * 0.006
        if abs(a-tmp) < abs_num:
            abs_num = abs(a-tmp)
            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()))

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


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

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

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

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

min_temp = float('inf')
for i,h in enumerate(H):
  t = T - h*0.006
  diff = abs(t-A)
  if diff<min_temp:
    min_temp = diff
    min_index = i+1

print(min_index)

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

ans = 0
min_t = float('inf')

for i in range(N):
    if abs((T - H[i] * 0.006) - A) < min_t:
        min_t = abs((T - H[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()))
z=10**3
ans=1001
for i in range(N):
    if abs(A-(T-H[i]*0.006))<z:
        z=abs(A-(T-H[i]*0.006))
        ans=i+1
print(ans)

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

Solution (Python):
import sys

input = sys.stdin.readline


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

    ans = -1
    diff = float("inf")
    for i in range(N):
        ave_t = T - H[i] * 0.006
        if abs(ave_t - A) < diff:
            diff = abs(ave_t - A)
            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()))

for i in range(n):
    i_temperature = t - h[i]*0.006
    dif_a = abs(a - i_temperature)
    if i == 0:
        champ = dif_a
    if champ >= dif_a:
        champ = dif_a
        ans = i+1

print(ans)

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):
import numpy as np

n = int(input())
t, a = map(int, input().split())
h = np.array([int(i) for i in input().split()])
tp = abs(t - 0.006*h - a)
print(np.argmin(tp)+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
tmp = 0
ans = 0
for i in range(n):
    if i == 0:
        tmp = abs(t - h[i] * 0.006 - a)
        ans = i
    elif abs(t - h[i] * 0.006 - a) <= tmp:
        tmp = abs(t - 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()))
diffmin=10**9
for i in range(N):
  Ti = T-0.006*H[i]
  diff = abs(A-Ti)
  if diff<diffmin:
    diffmin=diff
    ans=i+1
    
print(ans)

Solution (Python):
import numpy as np

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

gap = 1000000000000000000000

H = np.asarray(H)

Tem = T-H*0.006

for i in range(N):

    if abs(Tem[i]-A)<gap:
        gap = abs(Tem[i]-A)
        palace = i+1

print(palace)

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

t = [0 for i in range(N)]
diff = [0 for i in range(N)]

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

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline









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

ans = -1
ans_tp = 1000
for i in range(N):
    h = H[i]
    tp = T - 0.006*h
    if abs(ans_tp-A) > abs(tp-A):
        ans_tp = tp
        ans = i

print(ans+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = map(lambda x: abs(1000 * A - (1000 * T - int(x) * 6)), input().split())
score = float("inf")
pos = 0
for i, a in enumerate(H, 1):
    if score > a:
        score = a
        pos = i
print(pos)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))


N = ni()
T, A = na()
H = na()

ans = 0
min_a = 1000

for i, h in enumerate(H):
    t = T - (h * 0.006)
    a = abs(A - t)

    if min_a > a:
        min_a = a
        ans = i+1

print(ans)

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

temp = []

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

    temp.append(t)

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

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

mn = None
for i in range(N):
    x = abs(A - (T - H[i] * 0.006))
    if mn is None or x < mn[1]:
        mn = (i, x)
print(mn[0] + 1)

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

best_err, best_place = None, None
for i, h in enumerate(H, start=1):
    t = T - 0.006 * h
    err = abs(t - A)
    if best_err is None or err < best_err:
        best_err, best_place = err, i
print(best_place)

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

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

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

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


mn=abs(a-(t-hl[0]*0.006))
temp=[]
for i in range(n):
    mn=min(mn,abs(a-(t-hl[i]*0.006)))
    temp.append(abs(a-(t-hl[i]*0.006)))

print(temp.index(mn)+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))
ans = -1
minv = float('inf')
for i, h in enumerate(H):
	if abs(a - (t - h*0.006)) < minv:
		minv = abs(a - (t - h*0.006))
		ans = i + 1
print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split(' '))
places = [int(x) for x in input().split()]

base_temperature = abs(A - (T - places[-1] * 0.006))
num = N

for i in range(N - 1):
    temperature = abs(A - (T - places[i] * 0.006))
    if base_temperature > temperature:
        base_temperature = temperature
        num = i + 1

print(num)

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
min = 10000000
j = 0
pos = 0

for i in H:
  j += 1
  if abs(A - (T - 0.006 * i)) < min:
    min = abs(A - (T - 0.006 * i))
    pos = j
print(pos)

Solution (Python):
N=int(input())
T,A = map(int, input().split(' '))
places=[int(x) for x in input().split()]

diff = abs( A - T - places[-1]*0.006)
num = N

for i in range(N-1):
  temperature = abs( A - (T - places[i]*0.006))
  if diff > temperature:
    diff = temperature
    num=i+1

print(num)

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

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

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

Solution (Python):

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

check = []
append = check.append
for i, h in enumerate(H):
    append(
        {
            "index": i + 1,
            "temp": T - h * 0.006
        }
    )
check.sort(key=lambda x: abs(A - x["temp"]))

print(check[0]["index"])

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

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






IDX = -1
DIFF = 10000
for idx, height in enumerate(h):
    diff = abs(t - 0.006 * height - a)
    if diff < DIFF:
        DIFF = diff
        IDX = idx
print(IDX + 1)

Solution (Python):
INF = 10 ** 6

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

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

print(ans)

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

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

x = []

for i in range(0,n):
  tmp = t - h[i]*0.006
  x.append(abs(a-tmp))

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

Solution (Python):
INF = 10 ** 6

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

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

print(ans)