摘要:
题意:Iserlohn 要买运动鞋,商店总共有N双运动鞋,他总共有M元钱,这些运动鞋分为K类,每类都有自己的编号i,每类中的每双鞋有单价m,和Iserlohn对这双鞋的评价价值v。Iserlohn想每一类运动鞋至少买一双,在不超过他所拥有的总金额前提下,使他得到的v最大。http://acm.hdu.edu.cn/showproblem.php?pid=3033 1 #include <iostream> 2 #include <cstdio> 3 #include <vector> 4 #include <cstring> 5 using na 阅读全文
posted @ 2012-08-13 10:13
qijinbiao1
阅读(482)
评论(1)
推荐(0)
摘要:
题意:Roy 去抢N个银行,去抢第j个银行时能得到Mj的钱,被抓的概率为Pj。问在被抓的概率不大于P时能抢到的最多的钱是多少。 1 #include <iostream> 2 #include <cstdio> 3 #include <map> 4 #include <cstring> 5 using namespace std; 6 const int Ni = 110; 7 int money[Ni]; 8 double dp[10100]; 9 double pro[Ni];10 int dcmp(double a,double b)11 阅读全文
posted @ 2012-08-13 08:38
qijinbiao1
阅读(208)
评论(0)
推荐(0)

浙公网安备 33010602011771号