1785: 【CSP数组】查找“支撑数”▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:11 Solved:8

Description

在已知一组整数中,有这样一种数非常怪,它们不在第一个,也不在最后一个,而且刚好都比左边和右边相邻的数大,你能找到它们吗?

Input

第一行为整数 lns="http://www.w3.org/1998/Math/MathML">m,表示输入的整数个数。( lns="http://www.w3.org/1998/Math/MathML">3m100 )

第二行为 lns="http://www.w3.org/1998/Math/MathML">m 个整数。

Output

若干个支撑数,每行一个。

Sample Input Copy

10
1 3 2 5 7 6 8 5 9 0

Sample Output Copy

3
7
8
9