HDU1009】的更多相关文章

Hdu-1009 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1009 题意:Fatmouse准备M磅的猫食,准备与猫守卫仓库有他最爱吃的食品贸易,JavaBean仓库有N个房间.第i个房间包含J [i]磅 JavaBeans和需要F [i]磅猫食.FatMouse并不交易房间里的所有JavaBeans相反,他可以得到J [i] *a%磅的JavaBeans如果他支付F [i] *a%磅的猫食,这里a是实数.他现在是分配给你这个作业:告诉他,他能…
2017-07-14 18:18:31 writer:pprp 介绍:hdu1009 题目介绍,详见hdu1009 代码如下 #include <iostream> #include <algorithm> #include <cstdio> #include<iomanip> using namespace std; ; class mouse { public: int j; int f; int divide; }; bool cmp(mouse m1…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 62898    Accepted Submission(s): 21231 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats gu…
题意:有n个房子,每个房子里都有老鼠喜欢吃的咖啡豆J[i],但是每个房子都有猫看守,老鼠现在手上有M的猫粮.可以用猫粮换咖啡豆,每只猫都有猫粮的要求F[i].老鼠得到的咖啡豆是J[i]*a%       a%=给的猫粮/F[i]         求最多可以得到多少咖啡豆 思路:没看懂英文,所以搜了一下,看见他们说贪心...  其实也就是比例问题,每份F[i]可以换到越多的J[i]越好  ,  依着这个思路排序 然后在循环求答案就好了... 代码如下: #include <iostream> #…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 33703    Accepted Submission(s): 10981 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
FatMouse' Trade Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of JavaBeans and requ…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1009 题意:一共有n个房子,每个房子里有老鼠喜欢吃的javabeans,但是每个房间里的javabeans的价格不一样.老鼠用m元,问m元最多可以卖多少javabeans,其中每个房间里的javabeans可以被分割. 直接求单价,排序即可 #include<cstdio> #include<cstring> #include<iostream> #include<a…
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. The i-th room contains Jii pounds of JavaBeans and requires Fii pounds of cat food. FatMous…
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 POJ1016 POJ1017 POJ1169 POJ1298 POJ1326 POJ1350 POJ1363 POJ1676 POJ1786 POJ1791 POJ1835 POJ1970 POJ2317 POJ2325 POJ2390 POJ1012 POJ1082 POJ1099 POJ1114…