3467: 查找最接近的元素

Memory Limit:256 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

[md] 在一个非降序列中,查找与给定值最接近的元素。 [/md]

Sample Input Copy

3
2 5 8
2
10
5

Sample Output Copy

8
5