E. Array Shrinking
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
You are given an array a1,a2,…,an. You can perform the following operation any number of times:
Choose a pair of two neighbor