Editorial
Note $$$maxp$$$ as the maximum index of the maximum value in $$$a$$$.
For $$$1 \leq k \leq maxp-1$$$,they do not meet the condition.
For $$$maxp+1 \leq k \leq n$$$,they all meet the condition.
You need to be careful of $$$k==maxp$$$,it meet the condition if and only if there is only one maximum value in $$$a$$$.
Editorial
Note $$$a_1$$$ as the first $$$\lceil{n/2}\rceil$$$ numbers of $$$a$$$,and $$$a_2$$$ as the last $$$n-\lceil{n/2}\rceil$$$ numbers of $$$a$$$.
Through observation,we found that the following processes will be repeated cyclically:
erase the leftmost number of $$$a_1$$$
erase the leftmost number of $$$a_2$$$
erase the rightmost number of $$$a_1$$$
erase the rightmost number of $$$a_2$$$
Editorial
1
Editorial
1
Editorial
1
Editorial
1