#2898. SUBSTRACT

    ID: 2898 传统题 1000ms 512MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>P10960动态规划 DPSpecial JudgeO2优化背包 DP构造

SUBSTRACT

SUBSTRACT

题目描述

![](https://cdn.luogu.com.cn/upload/image_hosting/7iy6ncb0.png)![](https://cdn.luogu.com.cn/upload/image_hosting/4g4yijww.png)

输入格式

![](https://cdn.luogu.com.cn/upload/image_hosting/kgtenidc.png)

输出格式

![](https://cdn.luogu.com.cn/upload/image_hosting/5gdc86t2.png)
5 4
12
10
4
3
5
2
3
2
1

提示

Special Judge by @[w9095](luogu://user/569235) 标签: P10960|动态规划 DP|Special Judge|O2优化|背包 DP|构造

来源

P10960|SUBSTRACT