https://www.luogu.com.cn/problem/P2014 要输出方案 样例 输入 7 4 2 2 0 1 0 4 2 1 7 1 7 6 2 2 输出 13 2 3 6 7 求代码/思路