in 8 2 1 1 2 4 2 3 4
out 4
https://www.luogu.com.cn/blog/Manjusaka/solution-p3146
https://www.luogu.com.cn/blog/Tony102/solution-p3146
https://www.luogu.com.cn/blog/expect2004/solution-p3146
均输出 5
5