hdu 2069
此题限制了硬币的总数不超过100,先看不完全解决方案,不考虑硬币个数的限制。
找到dp[i]和dp[i-1]的关系。
#include<bits/stdc++.h>
using namespace std;
const int MONEY=251;
int type[5]={1,5,10,35,50};
int dp[MONEY]={0};
int main()
{
int s;
dp[0]=1;
for(int i=0;i<5;i++)
for(int j=type[
原创
2022-04-29 11:14:19 ·
77 阅读 ·
0 评论