package dp.数据结构优化dp; import java.util.Scanner; /** * https://blog.csdn.net/Rose_max/article/details/82932210 * 给你一个长度为n的序列,要求你把它分成K段 * 每段的价值为这段的总权值%P * 要求总价值最小 * n<=500000 K<=100 P<=100 * 4 3 10 4个数,分成3段,mod10最小 * 3 4 7 2 * out: * 6 * */ public class Cf958C3分段序列 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); k = sc.nextInt(); m = sc.nextInt(); } static int n, k, m; }