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()))

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

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

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
t,a = LI()
h = LI()
ans = inf
for i in range(n):
    if ans > abs(a-(t-h[i]*0.006)):
        ans = abs(a-(t-h[i]*0.006))
        idx = i+1
print(idx)

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n = int(input())
  t,a = map(int,input().split())
  H = list(map(int,input().split()))
  mi_ = float('inf')
  for i in range(n):
    temp = t - H[i] * 0.006
    if mi_ > abs(a-temp):
      mi_ = abs(a-temp)
      idx = i+1
  print(idx)
  
  
if __name__ == '__main__':
  main()

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

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

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



v, idx = 10**10, 0
for i in range(len(H)):
    tmp = abs(H[i] - A_h)
    if v > tmp:
        idx = i
        v = tmp
print(idx + 1)

Solution (Python):

n, t, a, *h = map(int, open(0).read().split())
mni = 0
mn = 1e18
for i in range(n):
	if mn>=abs(t-h[i]*0.006 - a):
		mn = abs(t-h[i]*0.006 - a)
		mni = i
print(mni+1)

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

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

ans = 0
T = 1000000000

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

print(ans)

Solution (Python):
N = int(input())
T,A = map(int,input().split(" "))
Pos = [int(i) for i in input().split(" ")]
best_pos = 0
temp_abs = 10**9
for i in range(N):
  t = T - Pos[i]*0.006
  Abs = abs(A - t)
  if Abs < temp_abs:
    best_pos = i+1
    temp_abs = Abs
print(best_pos)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000000)
INF = 10 ** 10
MOD = 10 ** 9 + 7
from heapq import heapify,heappop,heappush
input = sys.stdin.readline

def main():
    n = int(input())
    t,a = list(map(int,input().split()))
    dif = INF
    ans = -1
    h = list(map(int,input().split()))
    for i in range(n):
        if dif > abs(a - t + h[i] * 0.006):
            dif = abs(a - t + h[i] * 0.006)
            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()))
tmp = int(1e9)
ans = 0
for i in range(n):
    av_tmp = abs(a - (t-h[i]*0.006))
    if av_tmp < tmp:
        ans = i+1
        tmp = av_tmp
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 = 9999
tmp = 9999
for i in range(N):
    temp = T-H[i]*0.006
    x = abs(temp-A)
    if x <= ans:
        ans = x
        tmp = i+1
print(tmp)

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

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

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

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

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

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

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

avg = [abs(t-hi*0.006-a) for hi in h]

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

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

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

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

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

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

res = float("inf")
for idx, j in sabun:
    if res > j:
        res = j
        ans = idx

print(ans)

Solution (Python):
def main():
    from builtins import int, map, list, float, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    T,A = input_number_list()
    H = input_number_list()
    m = float('inf')
    idx = -1
    for i in range(N):
        if m > abs(A-(T-H[i]*0.006)):
            m = abs(A-(T-H[i]*0.006))
            idx = i
    print(idx+1)

if __name__ == '__main__':
    main()

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

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

res = float("inf")
for idx, j in sabun:
    if res > j:
        res = j
        ans = idx

print(ans)

Solution (Python):
import numpy as np

def getNearestIndex(list, num):
    """
    概要: リストからある値に最も近い値を返却する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx
def main():
    n = int(input())
    T, A = map(int, input().split())
    lst = list(map(int, input().split()))
    temper = [T-l*0.006 for l in lst]
    ind = getNearestIndex(temper, A)
    print(ind + 1)

if __name__ == '__main__':
    main()

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

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

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

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

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

x = (min(l))

print(l.index(x) + 1)

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

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

import numpy as np
print(np.argmin(ans) + 1)

Solution (Python):
import numpy as np
N = int(input())
t,a = list(map(int,input().split()))
H = list(map(int,input().split()))
H_ave = [a-(t-i*0.006) for i in H]
H = [abs(i) for i in H_ave]
print(H.index(min(H))+1)

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

ans = -1
sub = float("INF")
for i in range(N):
  temp = T - H[i] * 0.006
  if sub > abs(temp-A):
    sub = 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())))
nim = 1000000000
for i in range(N):
    H[i] = abs(T-H[i]*0.006 - A)
    if H[i] <= nim:
        nim = H[i]
        ans = i+1
print(ans)

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

ans = 10**9+7

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

Solution (Python):
import numpy as np

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

b = 600
num = 0
for j in range(n):
  temp = T - h[j]*0.006 - A
  t = np.abs(temp)
  if t < b:
    b = t
    num = j + 1

print(num)

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

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

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

ans = []

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

min_value = min(ans)

for i in range(n):
    if ans[i] == min_value:
        print(i+1)
        break

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

Solution (Python):

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

dif=999999
res=0
index=0

for hh in h:
    temp=t-hh*(0.006)
    index+=1
    if 0 <= abs(temp-a) <= abs(dif):
        dif=temp-a
        res=index

print(res)

Solution (Python):
spot=int(input())
avg_pre,object_pre =  (int(x) for x in input().split())   
temp_list = list(input().split())

ans_list=[]
for i in temp_list:
	ans_list.append(abs(avg_pre-0.006*int(i)-object_pre))

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

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().strip())
T, A = [int(str) for str in input().strip().split()]
H = [int(str) for str in input().strip().split()]

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

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

target=(T-A)/0.006

for i,point in enumerate(H):
  I[i]= abs(H[i]-target)


mini=min(I)
print(I.index(mini)+1)

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

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

mini = float('inf')
ans = 0

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

print(ans)

Solution (Python):
N = input()
TA = input().split()
T = int(TA[0])
A = int(TA[1])

first = True
place = 0
minTmep = 0

H = list(map(int, input().split()))
for i in range(0,len(H)):
    compare = abs(A * 1000 - (T * 1000 - H[i] * 0.006 * 1000))
    if first == True:
        place = i
        minTmep = compare
        first = False
    
    if minTmep > compare:
        place = i
        minTmep = compare

print(place + 1)

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

t, a = map(int, input().split())
x = list(map(int, input().split()))
mini = abs(a - (t - x[0] * 0.006))
ans = 1
for i in range(0, n):
    if mini > abs(a - (t - x[i] * 0.006)):
        mini = abs(a - (t - x[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()))
count = 10**9
ans = 0
for i in range(N):
    aveT = abs(A- (T - 0.006 * H[i]))
    if count >= aveT:
        count = aveT
        ans = i+1
print(ans)

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

t=[T]*N

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

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

Solution (Python):

import sys
import itertools
import math

i=0
j=0
N=int(input())
T, A=input().split()



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



T=int(T)
A=int(A)

     

absTH=[''for i in range(N)]


sentence_list=[]















    





first_term=0
second_term=0


     

  
     


     




     
     
distance = 0


'''p[, r]で
長さrのタプル列、重複なしのあらゆる並びを表す
今回はリストlの重複なしの並び替え順序を新たなリストに収納している
並び方を計算しリストに収納しているイメージ
l[0,1,2]
l[0,2,1]これにもリスト番号が0,1,2と割り振られている
これが全通り入っている
これ作った人はすごい
自分も早く理解したい
'''



'''
各経路の距離を足していき全距離分を経路数
で割れば平均距離が出るので各経路ごとの距離は
不必要と判断されている。
'''

i=0
j=0





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

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

Solution (Python):
N = int(input())
T = list(int(x) for x in input().split())
H = list(int(y) for y in input().split())
ans = list()
for i in H:
  div = 0
  tem = T[0] - i*0.006
  if tem > T[1]:
    div = tem - T[1]
  else:
    div = T[1] - tem
  ans.append(div)
print(ans.index(min(ans))+1)

Solution (Python):
import sys

n = int(input())

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

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

temperature_sub = 0
area_no = 0
temperature_store = 0

for index, item in enumerate(area):
    temperature = t - (item*0.006)
    temperature_sub = abs(a - temperature)

    if index == 0:
        temperature_store = temperature_sub
        area_no = index + 1
    else:
        if temperature_store > temperature_sub:
            temperature_store = temperature_sub
            area_no = index + 1

print("{}".format(area_no))

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

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

print(result)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = [int(x) for x in input().split()]
req_h = int(-(a-t)/0.006)

ans = 0
for i in range(1, n):
    if abs(h[ans] - req_h) > abs(h[i] - req_h):
        ans = i

print(ans+1)

Solution (Python):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
temp=[]
pre=[]
ans=1e3
for i in range(n):
    temp.append(t-h[i]*0.006)
    pre.append(abs(temp[i]-a))
    ans=min(ans,pre[i])
for i in range(n):
    if(ans==pre[i]):
        pri=i
        break
print(pri+1)

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

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

dt = []
for h in H:
    x = t - h * 0.006
    dt.append(abs(a - x))
print(dt.index(min(dt)) + 1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = 10000
minnum = float('inf')
for i in range(N):
  if abs(T-H[i]*0.006-A) < minnum:
    minnum = 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())
    hs = list(map(int, input().split()))
    diff = float("inf")
    for i in range(n):
        temp = t - hs[i] * 0.006
        if diff > abs(temp - a):
            diff = abs(temp - a)
            ans = i + 1
    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
import numpy as np

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

A = [abs(a-(t-x*0.006)) for x in h]
[idx] = [i for i, x in enumerate(A) if x == min(A)]

print(idx+1)

Solution (Python):
import numpy as np

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

A = list(map(lambda x: abs(a-(t-x*0.006)), h))
[idx] = [i for i, x in enumerate(A) if x == min(A)]

print(idx+1)

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

ans = -1
exp = 1000000007 
for i in range(n):
  avg = t - H[i] * 0.006
  
  if abs(a - avg) < exp:
    ans = i + 1
    exp = abs(a-avg)

print(ans)

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

ans = [float("inf"), 0]
for i,h in enumerate(H):
    tmp = abs(A - (T - h * 0.006))
    if ans[0] > tmp:
        ans = [tmp, i + 1]

print(ans[-1])

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

x = 0
temp = float('inf')
ans = 0
tmp = 0
for i in range(N):
    x = T - H[i]*0.006
    tmp = abs(x-A)
    if tmp < temp:
        temp = tmp
        ans = i+1

print(ans)

Solution (Python):

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



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

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

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

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

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

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

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

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

Solution (Python):
n = int,input()
t, a = map(int,input().split())
dic_oA = {}
dic_lA = {}
H = list(map(int,input().split()))
kome = 0

for i in H:
    T = t -i*6/1000
    kome += 1        
    if T >= a:
        dic_oA[kome] = T
    else:
        dic_lA[kome] = T

if len(dic_oA) == 0:
    print(max(dic_lA,key=dic_lA.get))
elif len(dic_lA) == 0:
    print(min(dic_oA,key=dic_oA.get))
else:
    sa_o = min(dic_oA.values())- a
    sa_l = a - max(dic_lA.values())
    if sa_o > sa_l:
        print(max(dic_lA,key=dic_lA.get))
    else:
        print(min(dic_oA,key=dic_oA.get))

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

temp = abs(a - (t - h_list[0] * 0.006))
result = 1
i=1
for h in h_list:
    if abs(a - (t - h * 0.006)) < temp:
        temp = abs(a - (t - h * 0.006))
        result = i
    i += 1
print(result)

Solution (Python):
import numpy as np
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
for i in range(n):
    h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h)+1)

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

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

print(ans)

Solution (Python):
import sys
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))
minh = min(h)
for i in range(n):
    if h[i] == minh:
        print(i+1)
        sys.exit()

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

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

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

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

    nearest = float('inf')
    nearest_num = 0
    for i in range(N):
        temp = T - H[i] * 0.006
        diff = abs(A-temp)
        if nearest > diff:
            nearest = diff
            nearest_num = i + 1
    
    print(nearest_num)

if __name__ == '__main__':
    solve()

Solution (Python):
n = int(input())
t, a = map(int, input().split())
li = list(map(int, input().split()))
x = 10**9
ind = 0
for i in range(n):
    mean = t - li[i] * 0.006
    sa = abs(mean - a)
    if sa < x:
        x = sa
        ind = i + 1
print(ind)

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

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

Solution (Python):
import numpy as np


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

    H_arr = np.array(H) * 0.006
    H_list = list(abs((T - H_arr) - A))

    ans = H_list.index(min(H_list)) + 1

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
n=int(input())
t,a=map(int,input().split())
t-=a
t*=1000
t/=6
h=list(map(int,input().split()))
minn,min=0,abs(h[0]-t)
for i in range(1,len(h)):
  if min>abs(h[i]-t):min=abs(h[i]-t);minn=i
print(minn+1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
c = list(map(int,input().split()))
l = []
for j, i in enumerate(c):
    l.append([abs(1000 * a - 1000 * t + 6 * i), j])
print(min(l)[1] + 1)

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

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

Solution (Python):
n = int(input())
t_ = input()
t_ = t_.split(" ")
t_ = list(map(int, t_))
a_d = t_[0]
t_d = t_[1]

s = input()
s = s.split(" ")
s = list(map(int, s))


ans_list = []

for v in range(n):
    ans = a_d - s[v] * 0.006 - t_d
    ans = abs(ans)
    ans_list.append(ans)
ans_ = ans_list.index(min(ans_list))

print(ans_+1)

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

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

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

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

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


arr = []
for i in range(n):
    arr.append(t - h[i]*0.006)

diff = []
for i in range(n):
    diff.append(abs(arr[i] - a))

index = -1
m = 10**12
for i in range(n):
    if m >= diff[i]:
        m = diff[i]
        index = i

print(index + 1)

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]
diff = [abs(i - a) for i in temp]

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

Solution (Python):
import math
import itertools
import statistics

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

m = 100000
min_index = -1
for i in range(n):
    tem = t-h[i]*0.006
    if abs(a-tem) < m:
        m = abs(a-tem)
        min_index = i

print(min_index+1)

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

ans_num = 1
ans_para = h[0]
for i, r in enumerate(h):
    deg = t - (r * 0.006)
    ans_para_deg = t - (ans_para * 0.006)
    if abs(a - ans_para_deg) >= abs(a - deg):
        ans_para = r
        ans_num = i+1
print(ans_num)

Solution (Python):


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

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

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


def celsius(x: int) -> float:
    return T - x * 0.006


ans = list(map(lambda h: abs(celsius(h) - A), H))
print(ans.index(min(ans)) + 1)

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
def high(h):
  return T - h*0.006
min_h = 10**4
ans = 0
for i, h in enumerate(H):
  if min_h > abs(A-high(h)):
    min_h = abs(A-high(h))
    ans = i+1
print(ans)

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

Solution (Python):
n=int(input())
t,a=map(int,input().split())
l=list(map(int,input().split()))
cal=(t-a)/0.006
tmp=abs(cal-l[0])
pl=1
for i in range(1,n):
  if tmp>abs(cal-l[i]):
    pl=i+1
    tmp=abs(cal-l[i])
print(pl)

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

diff = float("inf")
ret = 0
for i,h in enumerate(H):
  if abs(T-h*0.006-A) < diff:
    diff = abs(T-h*0.006-A)
    ret = i
print(ret+1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=[]
for hh in h:
  b.append(abs(t-hh*0.006-a))
c=min(b)

print(b.index(c)+1)

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

for i in range(n):
    d = t - h[i] * 0.006 - a
    
    if d >= 0:
        dlist.append(d)
    else:
        d = -d
        dlist.append(d)
        
m = dlist[0]
  
for i in range(1,n):
    if dlist[i-1] <= dlist[i]:
        if dlist[i-1] <= m:
            m = dlist[i-1]
        else:
            pass
    else:
        if dlist[i] <= m:
          	m = dlist[i]
        else:
          pass

        
print(dlist.index(m) + 1)

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

for i in range(n):
    d = t - h[i] * 0.006 - a
    
    if d >= 0:
        dlist.append(d)
    else:
        d = -d
        dlist.append(d)
        
m = min(dlist)
        
print(dlist.index(m) + 1)

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

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

min_dif = 99999999999999999
min_pt = 0
for i, h in enumerate(H):
  dif = abs(A - (T - h*0.006))
  if dif < min_dif:
    min_pt=i+1
    min_dif = dif
    
print(min_pt)

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

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