CRB and His Birthday Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 430 Accepted Submission(s): 237 Problem Description Today is CRB's birthday. His mom decided to buy many presents for her…
Problem Description Today is CRB's birthday. His mom decided to buy many presents for her lovely son. She went to the nearest shop with M Won(currency unit). At the shop, there are N kinds of presents. It costs Wi Won to buy one present of i-th kind.…
1.hdu 2126 Buy the souvenirs 题意:给出若干个纪念品的价格,求在能购买的纪念品的数目最大的情况下的购买方案. 思路:01背包+记录方案. #include<iostream> #include<cstdio> #include<cstring> using namespace std; ; ; int cnt[maxw]; int dp[maxw]; int p[maxn]; int main() { int t; scanf("%…
Bone Collector II Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4178 Accepted Submission(s): 2174 Problem Description The title of this problem is familiar,isn't it?yeah,if you had took pa…
The title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't matter,I will give you a link: Here is the link: http://acm.hdu.edu.c…
CRB and His Birthday Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1112 Accepted Submission(s): 559 Problem Description Today is CRB's birthday. His mom decided to buy many presents for her…
题意分析:0-1背包变形 递推公式:dp[i] = max(dp[i], 1-(1-dp[i-C])*(1-p)) /* I NEED A OFFER! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17860 Accepted Submission(s): 7152 Problem Description Speakless很早就想出国…