https://blog.csdn.net/csyifanZhang/article/details/106128211
↑详细题解
#define ll int
#define inf 0x3f3f3f3f
#define MAX 55
#define vec vector<ll>
#define P pair<ll,ll>
//dp[j]:凑出j需要的最小邮票数目
int K, N, a[MAX], dp[2000005];
int main() {
while (cin >> K >...