这篇题解
https://www.luogu.com.cn/article/jgl3520c
现在#1就过不了,评论也有hack。
这里有另一组hack:
4 5 1 2 5 2 3 5 3 4 5 1 3 5 1 4 20
答案:
30
他的输出:
20