in
7 6 3 1 1 7 3 1 1 1 6 1 1 6 10
out
26
感觉在哪见过这个就对了。
https://www.luogu.com.cn/blog/user21869/solution-p1561 33
https://www.luogu.com.cn/blog/55201/solution-p1561 38
另附第一篇题解给出的hack:
3 6 4 8 3 2 1
18
https://www.luogu.com.cn/blog/user77612/solution-p1561 17