这个数据
Input:
5
6 4 0 1 2
Output:
6
可以叉掉下面的题解:
https://www.luogu.com.cn/blog/Yaha/solution-p4098
https://www.luogu.com.cn/blog/efforts-will-pay-off/solution-p4098
https://www.luogu.com.cn/blog/Martin-MHT/solution-p4098
https://www.luogu.com.cn/blog/cjtcalc/solution-p4098
原因在于他们没有处理好边界问题或没有特判最大值。
请求添加Hack数据。