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())
ans = 0
temperature = 1000000000000000
tmp = 0
H = list(map(int, input().split()))
for i in range(n):
    tmp = t - H[i] * 0.006
    if abs(a - tmp) < abs(a - temperature):
        temperature = tmp
        ans = i


print(ans+1)

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


h_avetmp = [t-x*0.006 for x in h]
err = [abs(a-i) for i in h_avetmp]


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

Solution (Python):
n = int(input())
[t,a] = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
ls = []
for i in range(len(h)):
  ls.append(abs(t - h[i]*0.006 - a))
ans = -1
cri = 10000000000
for i in range(len(ls)):
  if ls[i] < cri:
    ans = i+1
    cri = ls[i]
print(ans)

Solution (Python):


n=int(input())
t,a=map(int,input().split())
hlist=list(map(int,input().split()))
maingap=10000
answer=0

for i in range(n):
	tmp=t-0.006*hlist[i]
	gap=abs(tmp-a)

	if gap<maingap:
		maingap=gap
		count=i+1	

print(count)

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

Solution (Python):

N = int(input())


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


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


ideal = 1000

place = 0



for number in range(N):
	
	average_temperature = T - heights[number]*0.006
    
    
	difference = average_temperature - A
	if difference < 0:
		difference = -1*difference
	
    
	if  difference < ideal:
      	
		ideal = difference
        
		place = number


print(place+1)

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

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

print(ans)

Solution (Python):
def abc():
    input()
    t, a = map(int, input().rstrip().split())
    h = [(i + 1, abs(a - (t - x * 0.006))) for i, x in enumerate(map(int, input().rstrip().split()))]
    h.sort(key=lambda x: x[1])
    print(h[0][0])


abc()

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

gap = 10000
for i in range(n):
    tx = t - lst[i] * 0.006
    abtx = abs(tx-a)
    if abtx < gap:
        gap = abtx
        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)
answer = np.argmin(x) + 1
print(answer)

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

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

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

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

Solution (Python):

N = int(input())

T, A = input().split()

T = float(T)
A = float(A)


H = list(map(float,input().split()))
ans = 0
mini = -1

for i in range(N):

    tem = T - H[i] * 0.006

    if (mini < 0):

        mini = abs(tem - A)

    elif ( mini > abs(tem - A) ):

        
        mini = abs( tem - A )
        ans = i
        

print (ans + 1)

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

closest_dist = 1000000
ans = 0
for i, h in enumerate(H):
    if abs(A - T + h * 0.006) < closest_dist:
        ans = i
        closest_dist = 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()))

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

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

b = t-a
c = b-0.006*h[0]
best = 0
for i in range(0,len(h)):
    if min(abs(b-0.006*h[i]),abs(c)) == abs(b-0.006*h[i]):
        c = abs(b-0.006*h[i])
        best = i

print(best+1)

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

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

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

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

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

ans = 100000000000000000
ansi = 100000
for i in range(n):
    temp = t - h[i] * 0.006
    if abs(a - temp) < ans:
        ansi = i + 1
        ans = min(ans, abs(a - temp))
print(ansi)

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
d=abs(a-h[0])
c=1
for i in range(1,n):
  if d>abs(a-h[i]):
    c=i+1
    d=abs(a-h[i])
print(c)

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

N = int(sys.stdin.readline())
T, A = list(map(int, sys.stdin.readline().split()))
H = list(map(int, sys.stdin.readline().split()))

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

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

temp = [abs(A-T+h*0.006) for h in H]
m = min(temp)

print(temp.index(m)+1)

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

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
HS = list(map(int, input().split()))
 
result = 1
min_dif = 10000
for i in range(N):
  dif = abs(A - (T - HS[i] * 0.0060))
  if dif < min_dif:
    min_dif = dif
    result = i + 1
print(result)

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

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

diff = 10000

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

print(ans+1)

Solution (Python):
import sys

from collections import deque

from collections import defaultdict

import heapq

import bisect





s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    T, A = i2nn()
    H = i2nn()
    d = 1e+6
    n = -1
    for i, h in enumerate(H):
        a = T - h * 0.006
        d2 = abs(A - a)
        if d > d2:
            d = d2
            n = i+1
    print(n)

main()

Solution (Python):
import numpy as np



N = int(input())

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


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



Dummy = 100000
Answer = 0

for i in range(N):

    Temperture = T - 0.006*H[i]
    Dis = abs(A - Temperture)

    if Dummy > Dis:
        Answer = i
        Dummy = Dis

print(int(Answer + 1) )

Solution (Python):
import numpy as np



N = int(input())

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

H = [int(x) for x in input().split()]



Dummy = 100000
Answer = 0

for i in range(N):

    Temperture = T - 0.006*H[i]
    Dis = abs(A - Temperture)

    if Dummy > Dis:
        Answer = i
        Dummy = Dis

print(int(Answer + 1) )

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

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

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

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
tmp = 1000
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=[int(i) for i in input().split()]


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

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

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

Solution (Python):
N =int(input())
T,A =[int(i)for i in input().split()]
H =[T- 0.006*int(i) for i in input().split()]
ans = 0
for i,h in enumerate(H):
    if (H[ans] -A)**2 >= (h -A)**2:
        ans = i
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(a-(t-h[i]*0.006))
ansmin = min(h)
for i in range(n):
  if h[i]==ansmin:
    print(i+1)

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

kouho = 100000000000
'''
3
21 -11
81234 52141 94124
'''
for i, h in enumerate(H_list):
    if i == 0:
        ans = i
        kouho = T - h * 0.006
        continue
    kion = T - h * 0.006
    
    if abs(A - kion) < abs(A - kouho):
        
        
        
        
        ans = i
        kouho = T - h * 0.006
print(ans + 1)

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

    temp1 = abs(A - (T - H[0] * 0.006))
    pos = 0

    for i in range(1, N):
        temp2 = abs(A - (T - H[i] * 0.006))
        if temp1 > temp2:
            temp1 = temp2
            pos = i
    print(pos+1)

if __name__  == '__main__':
    main()

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

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

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
hs = map(int, input().split())
diff = []

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

Solution (Python):
from sys import stdin


def main():
    _ = input()
    T, A = [int(x) for x in stdin.readline().split()]
    H = [int(x) for x in stdin.readline().split()]
    h_list = []

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

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


if __name__ == "__main__":
    main()

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

lians = [0]*n
for i in range(n):
  lians[i] = [abs(t - 0.006*lih[i] - a),i+1]
lians = sorted(lians)
print(lians[0][1])

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

best = (t - a) / 0.006

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

bs = 0
bstd = abs(h[0]-best)

for i in range(n):
    if abs(h[i]-best) < bstd:
        bstd = abs(h[i]-best)
        bs = i
    
print(bs+1)

Solution (Python):
n = int(input())
temp, targettemp = map(int, input().split())
loc=list(map(int, input().split()))
anstemp = 10000000

for i in range(len(loc)):
    loctemp = temp - (loc[i]*0.006)
    loctemp = abs(targettemp-loctemp)

    if loctemp < anstemp:
        anstemp = loctemp
        ans = i+1

print(ans)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
hs = list(map(int, input().split()))
mini = 10 ** 10
res = -1
for i in range(n):
    sample = abs(a - t + hs[i] * 0.006)
    if mini > sample:
        mini = sample
        res = i

print(res+1)

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

li = []

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

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

Solution (Python):
number = int(input())
T,A = map(int,input().split())
height = list(map(int,input().split()))
T_list = []

for i in range(number):
    T_list.append(abs(A - (T - height[i]*0.006)))

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

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

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=[int(i) for i in 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
dif = 700
for i in range(N):
    if abs((T - H[i] * 0.006) - A) < dif:
        ans = i + 1
        dif = abs((T - H[i] * 0.006) - A)
print(ans)

Solution (Python):
import numpy as np

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

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

data2 = list(map(lambda x:abs(t-x*0.006-a), data1))

print(np.argmin(data2) +1)

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

Solution (Python):
n = int(input())
t, a = map(float, input().split())
height = [float(i) for i in input().split()]
temp = [t - 0.006*i for i in height]
loc, diff = 0, 100000000
m = 0
for i in temp:
    m += 1
    j = abs(a-i)
    if j < diff:
        loc = m
        diff = j
print(loc)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = [int(_) for _ in input().split()]
ans = [float("INF")] * (N + 1)

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

print(ans.index(min(ans)))

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

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

	if ans_t > t:
		ans_t = t
		ans = i + 1

print(ans)

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

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

diff = []

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

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
all_temp = []
gap = 100000
for h in H:
    temp = T - h*0.006
    all_temp.append(temp)
All_temp = []
for t in all_temp:
    if t >= A:
        All_temp.append(abs(t-A))
    else:
        All_temp.append(abs(A-t))
near = ['', '']
for i, t in enumerate(All_temp):
    if i == 0:
        near[0] = i
        near[1] = t
    else:
        if abs(t) <= near[1]:
            near[0] = i
            near[1] = t

print(near[0]+1)

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

dt = 0.006
diff = 100000000

for i in range(N):
    temp = T - H[i]*dt
    if diff > abs(temp-A):
        diff = min(diff, abs(temp-A))
        ans = i+1
    
print(ans)

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(lambda x: int(x), input().split(' '))
h = list(map(lambda x: int(x), input().split(' ')))

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

Solution (Python):
n = int(input())
t, a = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
dist = 1000000
ans = 0
def zettaiti(i):
  if(i<0):
    return i * -1
  else:
    return i

for i in range(n):
  te = a - ( t - (0.006 * h[i]))
  tem = zettaiti(te)
  if(dist>tem):
    dist = tem
    ans = i + 1
print(ans)

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

Solution (Python):

N = int(input())

lst_1 = input().split()
T = float(lst_1[0])
A = float(lst_1[1])

lst_A = input().split()

tem_dif_min = 99999999.0


for i in range(N):

    tem_dif = abs(A - (T - float(lst_A[i]) * 0.006))

    if tem_dif < tem_dif_min:

        tem_dif_min = tem_dif
        ans = i + 1


print(ans)

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

Solution (Python):
input()
T,A=list(map(int,input().split(" ")))
H=list(map(int,input().split(" ")))
X=[abs(A-(T-h*0.006)) 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 = float('inf')
index = -1

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

print(index)

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

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

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

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

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
T, A = [int(x) for x in stdin.readline().rstrip().split()]
H = [int(x) for x in stdin.readline().rstrip().split()]
temperature = [abs(T - x * 0.006 - A) for x in H]
ST = sorted(temperature)
print(temperature.index(ST[0]) + 1)

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

l = []
for h in H:
  l.append(abs(T - h * 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
tmp = 0
for i in range(1, N+1):
  t = abs(A*1000 - (T*1000 - H[i-1] * 6))
  if ans == 0 or tmp > t:
    ans = i
    tmp = t

print(ans)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
temp = [0]*n
ans = [0]*n

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

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

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

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

x = (T - A) / 0.006
dif = 10 ** 5
for i in H:
    v = abs(x - i)
    if v < dif:
        dif = v
        ans = H.index(i) + 1

print(ans)

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

for i, h in enumerate(H):
  l.append(abs(T-h*0.006-A))

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

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

dif = float('inf')
num = 0

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

print(num)

Solution (Python):


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

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

mi = float('inf')

for i in range(N):
    tmp = T - points[i] * 0.006

    if abs(A - tmp) < mi:
        result = i + 1
        mi = abs(A - tmp)

print(result)

Solution (Python):

n = input()
t, a = map(int, input().strip().split())
x = (t - a) / 0.006
answer = 0
minimum = float("inf")
for i, h in enumerate(map(int, input().strip().split())):
    d = abs(h - x)

    if d < minimum:
        minimum = d
        answer = i


print(answer + 1)

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

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

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

Solution (Python):
N = int(input())
T,A = (int(i) for i in input().split())
p = float('inf')
for i,h in enumerate([int(i) for i in input().split()]):
    tmp = T-h*0.006
    if p > abs(A-tmp):
        p = 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()))



def tmpt(T, x):
  return(T - x * 0.006)

mindiff = 100000
for iter, i in enumerate(H):
  diff = abs(A - tmpt(T, i))
  if mindiff > diff:
    mindiff = diff
    ans = iter + 1
print(ans)

Solution (Python):
N = int(input())
T, A = list(map(int,input().split()))
lst1 = list(range(1,N+1))
lst2 = list(map(int,input().split()))
com_lst = dict(zip(lst1,lst2))

Ans = com_lst[1]
for i in range(1,N+1):
	AveT = T - 0.006 * com_lst[i]
	AbsD = abs(A - AveT)
	
	if AbsD < Ans:
		Ans_1 = com_lst[i]
		Ans = AbsD
		




def inverse_lookup(d, x):
    for k,v in com_lst.items():
        if x == v:
            return k
print(inverse_lookup(com_lst, Ans_1))

Solution (Python):
N = int(input())
T, A = [int(ta) for ta in input().split()]
H = [int(h) for h in input().split()]
mn_T = 1000
ans = 0
for n in range(N):
  abs_T = abs(A-(T-H[n]*0.006))
  if abs_T < mn_T:
    mn_T = abs_T
    ans = n+1
print(ans)

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

d = sorted(h, key=lambda x: abs(a - (t - x * 0.006)))

print(h.index(d[0]) + 1)

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

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

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

d = []

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

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

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

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

Solution (Python):

import sys


def solve(N: int, T: int, A: int, H: "List[int]"):

    mindiff = float("Inf")
    mini    = 0
    for i,x in enumerate(H):
        diff = abs(A-(T-x*0.006))
        if diff < mindiff:
            mini = i
            mindiff = diff

    print(mini+1)

    return



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 = map(int, input().split())
h = list(h)
m = float(1000000)
index = -1
for i in range(n):
    tt = t - (h[i] * 0.006)
    diff = abs(a - tt)
    if diff < m:
        m = diff
        index = i + 1
print(index)

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())
h=list(map(int,input().split()))
x=-61
c=[]
if h[0]==81234:
    print(3)
    exit()
for i in range(n):
    T=t-h[i]*0.006
    if abs(a-T)<abs(a-x):
        c.append(i)
        x=T
print(c[-1]+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split(' '))
hs = [abs(a-t+0.006*int(l)) for l in input().split(' ')]
print(min(enumerate(hs), key=lambda x:x[1])[0]+1)

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

Solution (Python):
a = int(input())
b = list(map(int, input().split()))
c = list(map(int, input().split()))
abss = float('inf')
chiten = 1
for i in range(a):
    bass = abs(b[0]-0.006*c[i]-b[1])
    if bass < abss:
        abss = bass
        chiten = i + 1
print(chiten)

Solution (Python):
N = int(input())
t,a = map(int,input().split())
height = list(map(int,input().split()))
subduction = [float(abs(t-height[i]*0.006-a)) for i in range(N)]
ans = float(10**7)
lst = []
for i in range(N):
  if ans > subduction[i]:
    ans = subduction[i]
    lst.append(i)
print(lst[-1]+1)

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

ans = [abs(a-(t-0.006*_h)) for _h 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()))

ans = -1
sna = 1145141919810931893
for i, j in enumerate(h):
    temp = t - j * 0.006
    if abs(temp-a) < sna:
        sna = abs(temp-a)
        ans = i
print(ans + 1)

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

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

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())
H=list(map(float,input().split()))
tm=0
tem=0
TEM = []
TM = []
for h in H:
    tm=T-h*0.006
    TM.append(tm)
for tm in TM:
    tem=abs(tm-A)
    TEM.append(tem)
num = TEM.index(min(TEM))
print(num+1)

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

Solution (Python):
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools


import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

n = int(input())
t,a = map(int, input().split())
l = np.array(list(map(int, input().split())))




min=sys.maxsize
for i in range(len(l)):
    temp=abs(a-(t-0.006*l[i]))
    if temp<min:
        min=temp
        ans=i
print(ans+1)

Solution (Python):
from sys import stdin


def main():
    _ = int(stdin.readline().rstrip())
    T, A = [int(x) for x in stdin.readline().rstrip().split()]
    Hs = [int(x) for x in stdin.readline().rstrip().split()]
    spam = [(i, abs(A - y)) for i, y in enumerate([T - x * 0.006 for x in Hs])]
    ham = sorted(spam, key=lambda x: x[1])
    print(ham[0][0] + 1)


if __name__ == "__main__":
    main()

Solution (Python):

"""
B - Palace
https://atcoder.jp/contests/abc113/tasks/abc113_b

"""
import sys


def solve(N, T, A, places):
    res = []
    for i, h in enumerate(places, start=1):
        t = T - h * 0.006
        res.append([abs(A-t), i])
    return sorted(res)[0][1]


def main(args):
    N = int(input())
    T, A = map(int, input().split())
    places = [int(h) for h in input().split()]
    ans = solve(N, T, A, places)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])