TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N=int(input())
T, A=map(int, input().split())
N=list(map(int,input().split()))
temp=list(map(lambda x: abs(A-(T-0.006*x)),N))
temp.index(min(temp)+1)

N=int(input())
T, A=map(int, input().split())
N=list(map(int,input().split()))
temp=list(map(lambda x: abs(A-(T-0.006*x)),N))
temp.index(min(temp))

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
input = sys.stdin.readline
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
m = 1 
mindis = T-H[0]*0.006
for i in range(1,N):
  if mindis > T-H[i]*0.006:
    m = i+1
    mindis = T-H[i]*0.006
print(m)
        

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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(min(palace)+1)))

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)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = input()
T, A = list(map(int, input().split()))
Hs = list(map(int, input().split()))

sHs = []
for idx,h in enumerate(Hs):
  sHs.append((h, idx))

sHs = sorted(sHs)

last = 99999999999999
lastidx = -1
for sh in sHs:
  dif = abs(A - (T - 0.006 * sh[0]))
  if last > dif:
    last = dif
    lastidx = sh[1]


print(lastidx)

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

last = 99999999999999
lastidx = -1
for idx, h in enumerate(Hs):
  dif = abs(A - (T - 0.006 * h))
  if last > dif:
    last = dif
    lastidx = idx + 1


print(lastidx)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
h=list(map(lambda x:t-x*0.006-a,h))
print(h.index(min(h))+1)


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
t_list=[]
for i in range(n):
    math.fabs(t-h[i]*0.006-a)
print(min(t_list))

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
  diff=before-math.fabs(t-h[i+1]*0.006-a)
  print(diff)
  if diff>0:
    before=math.fabs(t-h[i+1]*0.006-a)
    num=i+2
print(num)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff<0:
       mi=i+1
print(mi)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    print(diff)
    if diff>0:
        before=math.fabs(t-h[i+1]*0.006-a)
        num=i+1
print(num)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
print(before)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
  diff=before-math.fabs(t-h[i+1]*0.006-a)
  if diff>0:
    before=math.fabs(t-h[i+1]*0.006-a)
    num=i+2
print(num)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from numpy import array, argmin

input()
temp_on_sea, oracle = map(int, input().rstrip("\n").split())
heights = list(map(int , input().rstrip("\n").split()))

temp_diff = [temp_on_sea - height * 0.006 - oracle for height in heights]

print(array(temp_diff).argmin() + 1)


from numpy import array, argmin

input()
temp_on_sea, oracle = map(int, input().rstrip("\n").split())
heights = list(map(int , input().rstrip("\n").split()))

temp_diff = [temp_on_sea - height * 0.006 for height in heights]

print(array(temp_diff).argmin() + 1)


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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
temp = float('inf')
for i in range(N):
  if T-H[i]*0.006 < temp:
    temp = T-H[i]*0.006
    ans = i
    
print(i+1)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
ta=list(input().split())
T=int(ta[0])
A=int(ta[1])
Hi=int(list(input().split()))
print(min(abs(A-t))for i in t=T-Hi[i]*0.006)

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a =map(int, input().split())
h = list(map(int, input().split()))
d_degree = 100000j
ans = 0
for i in range(n):
    degree = t - h[i]*0.006
    if d_degree > abs(a - degree):
        d_degree = abs(a - degree)
        ans = i+1
print(ans)


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
Hs = map(int, input().split())
T_cal = [abs(T - H * 0.006 - A) for H in Hs]
print(T_cal)
print(T_cal.index(min(T_cal))+1)

N = int(input())
T, A = map(int, input().split())
Hs = map(int, input().split())
T_cal = [abs(T - H * 0.006 - A) for H in Hs]
print(T_cal.index(min(T_cal))+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
list = list(map(input().split()))

count = t
result = 0

for i in range(n):
    test = t - list[i]*0.006
    if test >= a:
        if test-a <= count:
            count = test - a
            result = i
        else:
            pass
    else:
        if a-test <= count:
            count = a - test
            result = i
        else:
            pass
          
print(result)

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

list = []

for i in range(n):
    temperature = t - list_original[i]*0.006
    list.append(temperature)

point = list.index(min(list)) + 1

print(point)

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

list = []

for i in range(n):
    temperature = abs(t - list_original[i]*0.006)
    list.append(temperature)

point = list.index(min(list)) + 1

print(point)


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

count = t
result = 0

for i in range(n):
    test = t - list[i]*0.006
    if test >= a:
        if test-a <= count:
            count = test - a
            result = i+1
        else:
            pass
    else:
        if a-test <= count:
            count = a - test
            result = i+1
        else:
            pass
          
print(result

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

list = []

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

point = list.index(min(list)) + 1

print(point)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
temp = []
for i in range(n):
  temp.append(a-(t-H[i]*0.006))
temp_abs = [abs(j) for j in temp]
print(min(temp_abs))

n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
minitemp = 10*100
for i in range(len(H)):
  H[i] = abs(t-H[i]*0.006)
  minitemp = min(minitemp,H[i])
for j in range(len(H)):
  if H[j] == minitemp:
    print(j+1)
    break



n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
temp = []
for i in range(n):
  temp.append(a-(t-H[i]*0.006))
print(min(abs(temp)))

n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
minitemp = 10*100
for i in range(len(H)):
  H[i] = abs(a-(t-H[i]*0.006))
  minitemp = min(minitemp,H[i])
for j in range(len(H)):
  if H[j] == minitemp:
    print(j+1)
    break



Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))

mint = a - (t - h[0] * 0.006)

for i in range(len(h)):
    T = t - h[i] * 0.006
    if abs(a - T) <= mint:
        min = i + 1

print(min)

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

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

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

print(min + 1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b, c = map(int, input().split())
A = list(map(int, input().split()))
print(A)
tem = 0
st = 0
st2 = 0
for i in range(a):
    tem = c-(b-A[i]*0.006)
    tem = abs(tem)
    if i == 0:
        st = tem
    else:
        if st < tem:
            st = st
        else:
            st = tem
            st2 = i
print(st2+1)


a = int(input())
b, c = map(int, input().split())
A = list(map(int, input().split()))
tem = 0
st = 0
st2 = 0
for i in range(a):
    tem = c-(b-A[i]*0.006)
    tem = abs(tem)
    if i == 0:
        st = tem
    else:
        if st < tem:
            st = st
        else:
            st = tem
            st2 = i
print(st2+1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

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

    diff = 0
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - temp)
        print(index, temp)

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = True

    print(answer)


import math

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

    diff = 0
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - temp)
        

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = False

    print(answer+1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int, input().split())
h = map(int, input().split())
import numpy as np
print(np.argmin([abs(a - (t - i*6e-3)) for i in h]))

n = int(input())
t,a = map(int, input().split())
h = map(int, input().split())
import numpy as np
print(np.argmin([abs(a - (t - i*6e-3)) for i in h])+1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
print(H)
no=0
noabs=100000.0
for i in range(N):
    NT=T-H[i]*0.006
    if noabs>=abs(NT-T):
        no=i+1
        noabs=abs(NT-T)
print(no)

N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
no=0
noabs=100000.0
for i in range(N):
    NT=T-H[i]*0.006
    if noabs>=abs(NT-A):
        no=i+1
        noabs=abs(NT-A)
print(no)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import bisect
N = int(input())
T, A = map(int, input().split())
H = [0]*N
H = list(map(int, input().split()))

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

TLsort = sorted(TL)
idx = bisect.bisect_left(TLsort, A)
ansVal = 0
if idx == N:
    ansVal = TLsort[idx-1]
else:
    L = A - TLsort[idx-1]
    R = TLsort[idx] - A
    if L > R:
        ansVal = TLsort[idx-1]
    else:
        ansVal = TLsort[idx]

ans = TL.index(ansVal) + 1
print(ans)

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

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

ansVal = min(TL)
ans = TL.index(ansVal) + 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np
def main():
    ttt = []
    n = int(input())
    e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141]]
    for i in range(n):
        t = e[0][0] - e[1][i]*0.006
        tt = abs(e[0][1] - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

import numpy as np
def main():
  ttt = []
  n = int(input())
  e = [[int(i) for i in input().split()] for i in range(int(input()))]
  for i in range(n):
    t = e[0][0] - e[1][i]*0.006
 	tt = abs(e[0][1] - t)
    ttt.append(tt)
  print(np.argmin(ttt)+1)
  

import numpy as np
def main():
    
    n = int(input())
    e = [list(map(int, input().split())) for _ in range(n)]
    
    #n = 3
    #e = [[21,-11],[81234,94124,52141]]
    for j in range(n):
        t = e[0][0] - e[1][j]*0.006
        tt = abs(e[0][1] - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
ttt = []
main()


import numpy as np
def main():

    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

import numpy as np
def main():
  ttt = []
  n = int(input())
  e = [[int(i) for i in input().split()] for i in range(int(input()))]
  for i in range(n):
    t = e[0][0] - e[1][i]*0.006
    tt = abs(e[0][1] - t)
    ttt.append(tt)
  ttt = np.array(ttt)
  print(np.argmin(ttt)+1)
main()

import numpy as np
def main():
  ttt = []
  n = int(input())
  e = [[int(i) for i in input().split()] for i in range(int(input()))]
  for i in range(n):
    t = e[0][0] - e[1][i]*0.006
 	tt = abs(e[0][1] - t)
    ttt.append(tt)
  print(np.argmin(ttt)+1)
main()

import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    [T, A] = string_to_int(inputs[1])
    H = string_to_int(inputs[2])

    min_diff = -1
    min_diff_i = -1
    for i, h in enumerate(H):
        t = T - h * 0.006
        diff = abs(A-t)
        if min_diff == -1 or diff < min_diff:
            min_diff = diff
            min_diff_i = i
    return min_diff_i


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    [T, A] = string_to_int(inputs[1])
    H = string_to_int(inputs[2])

    min_diff = -1
    min_diff_i = -1
    for i, h in enumerate(H):
        t = T - h * 0.006
        diff = abs(A-t)
        if min_diff == -1 or diff < min_diff:
            min_diff = diff
            min_diff_i = i
    return min_diff_i + 1


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(3))
    print(ret)


Verdicts: Runtime Error

Accepted
Problem: 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.

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

n=int(input())
t,a=map(int,input().split())
h = list(map(int, input().split()))
x = [abs(a-(t-b*0.006)) for b in h]
print(x.index(min(x)))

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

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

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

print(n,t,a,h)
t_2 = (t-a)/0.006

res = -1000

for m in range(n):
  num_ = abs(t_2 - h[m])
  if m == 0:
    res = num_
    res_2 = m + 1
  elif res > num_:
    res_2 = m + 1
print(res_2)

n = int(input())

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

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

t_2 = (t-a)/0.006
print(t_2)
res = 1000000

for m in range(n):
  num_ = abs(t_2 - h[m])
  if res > num_:
    res = num_
    res_2 = m + 1
print(res_2)

n = int(input())

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

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

t_2 = (t-a)/0.006
print(t_2)
res = 1000

for m in range(n):
  num_ = abs(t_2 - h[m])
  if m == 0:
    res = num_
    res_2 = m + 1
  elif res > num_:
    res = num_
    res_2 = m + 1
print(int(res_2))

n = int(input())

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

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

t_2 = (t-a)/0.006
res = 1000000

for m in range(n):
  num_ = abs(t_2 - h[m])
  if res > num_:
    res = num_
    res_2 = m + 1
print(res_2)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
t = 999 
p = 0 
for i in range(H):
  if t > abs(A - T - H[i]*0.006):
    t = abs(A - T - H[i]*0.006)
    p = i+1
print(p)

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
t = 999 
p = 0 
for i in range(len(H)):
  if t > abs(A - T + H[i]*0.006):
    t = abs(A - T + H[i]*0.006)
    p = i+1
print(p)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
listH = list(map(int, input().split()))

nearA=10000000
number=0
index=0
while index < len(listH):
    h = listH[index]
    if index ==0:
        nearA = max(t-h*0.0006, a)-min(t-h*0.006, a)
        number = index+1
    elif max(t-h*0.006, a)-min(t-h*0.006, a)< nearA:
        nearA = max(t-h*0.006, a)-min(t-h*0.006, a)
        number = index+1
    index+=1

print(number)

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

nearA=10000000
number=0
index=0
while index < len(listH):
    h = listH[index]
    if index ==0:
        nearA = max(t-h*0.006, a)-min(t-h*0.006, a)
        number = index+1
    elif max(t-h*0.006, a)-min(t-h*0.006, a)< nearA:
        nearA = max(t-h*0.006, a)-min(t-h*0.006, a)
        number = index+1
    index+=1

print(number)
    


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = list(map(int, input().split()))
H = np.array(list(map(int, input().split())))

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


import numpy as np

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#113 b-palce
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
mini=10**6
ans=0
for i in range(len(h)):
    kion=t-0.006*h[i]
    sa=abs(a-kion)
    print(i,sa)
    if sa<mini:
        mini=sa
        ans=i+1
print(ans)

#113 b-palce
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
mini=10**6
ans=0
for i in range(len(h)):
    kion=t-0.006*h[i]
    sa=abs(a-kion)
    if sa<mini:
        mini=sa
        ans=i+1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from sys import stdin
n = 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()]
answers=[t-h*0.006 for h in hs]
ansers=[abs(an-a)for an in answers]
print(min(answers))

from sys import stdin
n = 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()]
answers=[t-h*0.006 for h in hs]
answers=[abs(an-a)for an in answers]
print(min(answers))

from sys import stdin
n = 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()]

answers=[t-h*0.006 for h in hs]

answers=[abs(an-a) for an in answers]

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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))+2)

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)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
option = int(input())
ref_t, tmp_id = int(input().split())
height = (int(n) for n in input().split())

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

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

option = int(input())
ref_t, tmp_id = int(input().split())
height = (int(n) for n in input().split())

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

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

option = int(input())
ref_t, tmp_id = int(input().split())
height = list((int(n) for n in input().split()))

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

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

option = int(input())
ref_t, tmp_id = (int(n) for n in input().split())
height = list((int(n) for n in input().split()))

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.006)))

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,t,a,*h=map(int,open(0).read().spilt())
d,i=10**18,0
for j in range(n):
  if abs(a-t+h*0.006)<d:
    d=abs(a-t+h*0.006)
    i=j
print(i+1)

n,t,a,*h=map(int,open(0).read().spilt())
d,i=10**18,0
for j in range(n):
  if abs(a-t+h[j]*0.006)<d:
    d=abs(a-t+h[j]*0.006)
    i=j
print(i+1)

_,t,a,*h=map(int,open(0).read().split());m=[abs(t-6e-3*x-a)for x in h];print(m.index(min(m))+1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = (int(x) for x in input().split())
H = [int(x) for x in input().split()]
print(H)


def calcTemp(x, y):
    return x - y * 0.006


min = 1000000
counter = 1
numPlace=0
for height in H:
    tmp = abs(A - calcTemp(T, height))
    if min > tmp:
        min = tmp
        numPlace = counter
    counter += 1
print(numPlace)

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


def calcTemp(x, y):
    return x - y * 0.006


min = 1000000
counter = 1
numPlace=0
for height in H:
    tmp = abs(A - calcTemp(T, height))
    if min > tmp:
        min = tmp
        numPlace = counter
    counter += 1
print(numPlace)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))
dist = 10000
ans = 0
for i in range(n):
    if dist > abs(A - (T - h[i] * 0.006)):
        dist = abs(A - (T - h[i] * 0.006))
        ans = i
        print(abs(A - (T - h[i] * 0.006)))
print(ans + 1)

n = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))
dist = 10000
ans = 0
for i in range(n):
    if dist > abs(A - (T - h[i] * 0.006)):
        dist = abs(A - (T - h[i] * 0.006))
        ans = i
print(ans + 1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

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

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

li = []
for i in range(len(h)):
  li.append(int(t - h[i]*0.006))
  
print(index(min(li)))

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

li = []
for i in range(len(h)):
  li.append(t - h[i]*0.006)
  
print(index(min(li)))

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T,A=map(int,input().split())
height_list =list(map(int,input().split()))
val =10000
site=0
for i in range(N):
	if abs(A-T+0.006*height_list[i])<=val:
		val = abs(T-0.006*height_list[i])
		site = i
print(site+1)

N=int(input())
T,A=map(int,input().split())
height_list =list(map(int,input().split()))
val =10000
site=0
for i in range(N):
	if abs(A-T+0.006*height_list[i])<val:
		val = abs(T-0.006*height_list[i])
		site = i
print(site+1)

N = int(input())
T,A=map(int,input().split())
h_list =list(map(int,input().split()))
dif_list = [abs(A-(T-x*0.006)) for x in h_list]
mn =min(dif_list)
for i in range(N):
	if mn == dif_list[i]:
		break
print(i+1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = abs(t - 0.006 * li[i])
    p.append(m)

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

n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = t - 0.006 * li[i]
    p.append(m)
print((t-min(p)) // 0.006)

n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = t - 0.006 * li[i]
    p.append(m)
print(int((t-min(p)) / 0.006))

n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = abs(a-(t - 0.006 * li[i]))
    p.append(m)

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted