You are given a list of numbers . For each element at position (), we define and as:
= closest index j such that j < i and . If no such j exists then = 0.
= closest index k such that k > i and . If no such k exists then = 0.
We define = * . You need to find out the maximum among all i.
The first line contains an integer , the number of integers.
The next line contains the integers describing the list a[1..N].