Олимпиадный тренинг

Задача 18782. traffic police


Задача

Темы:
GAI
 
There are traffic police posts along the highway at points X1,X2,...,XN. 
There was a minor accident at point X (traffic accident).
It is required to determine which of the traffic police posts is closest
to this point in order to send a police squad from it to the scene.
 
Input data
In the input file, the first number N is written - the number of traffic police points. (1<=N<=100)
The following are the coordinates of the location of traffic police posts on a straight highway
(integers from -10000 to 10000). Next comes the coordinate of the point,
in which the DTM occurred (integer from -10000 to 10000).
 
Output
It is required to display one number in the output file - the number of the traffic police post,
from which you need to send an outfit to the scene of an accident. If multiple posts
The traffic police are at the same distance from the point of the accident, print any of them.
 
Sample input file
5
10 2 8 -7 3
7
 
Sample Output
3