Gold CoinsTime Limit: 1000MSMemory Limit:
30000KTotal Submissions: 20802Accepted: 13018DescriptionThe king pays his loyal
knight in gold coins. On the...
分类:
其他好文 时间:
2014-05-31 21:00:16
阅读次数:
360
完全背包。 1 #include 2 #include 3 4 int a[105], c[105];
5 int n, m; 6 int dp[100005]; 7 8 int mymax(int a, int b) { 9 return a>b ?
a:b;10 }11 12 v...
分类:
其他好文 时间:
2014-05-27 23:50:21
阅读次数:
436
Square Coins
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7748 Accepted Submission(s): 5238
Problem Description
People in Silverl...
分类:
其他好文 时间:
2014-05-24 21:06:18
阅读次数:
220
题目:
链接:点击打开链接
题意:
有n个硬币,知道其价值A1。。。。。An。数量C1。。。Cn。问在1到m价值之间,最多能组成多少种价值。
思路:
dp[i]表示i价值能够组成的最大种数。
代码:
#include
#include
#include
using namespace std;
int n,m;
int a[110],c[110];
int ...
分类:
其他好文 时间:
2014-05-22 13:26:38
阅读次数:
205
题目链接:
点击打开链接
题目:
Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch...
分类:
其他好文 时间:
2014-05-18 15:56:34
阅读次数:
264
问题描述:超市有4种包装的鸡蛋,分别是3个一盒,6个一盒,9个一盒和20个一盒。问顾客要买N个鸡蛋时,所有的组合方案。(Morgen Stanley 2014
Intern).核心代码: 1 void BuyeggsCore(vector &coins, const int target, int ...
分类:
其他好文 时间:
2014-05-16 20:17:07
阅读次数:
289
CoinsTime Limit:3000MSMemory Limit:30000KTotal
Submissions:27580Accepted:9335DescriptionPeople in Silverland use coins.They
have coins of value A1,A2,...
分类:
其他好文 时间:
2014-05-14 11:52:46
阅读次数:
270
题目:
Description
People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very n...
分类:
其他好文 时间:
2014-05-09 15:00:55
阅读次数:
345
Suppose there are 5 types of coins: 50-cent,
25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins
for a given amount of mone...
分类:
其他好文 时间:
2014-05-04 12:00:00
阅读次数:
363
Square Coins
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7612 Accepted Submission(s): 5156
Problem Description
People in Sil...
分类:
其他好文 时间:
2014-04-29 13:38:21
阅读次数:
316