HDOJ-1009 FatMouse' Trade】的更多相关文章

FatMouse' Trade 点我挑战题目 题意分析 每组数据,给出有的猫粮m与房间数n,接着有n行,分别是这个房间存放的食物和所需要的猫粮.求这组数据能保证的最大的食物是多少? (可以不完全保证这个房间的食物,及食物和猫粮可以同时乘a%) 经典的贪心策略. 先保证性价比最高的房间(花较少的猫粮可以保证最多的粮食),每组数据计算一个比率rate = 房间存放的粮食/所需要的猫粮,按照rate对其进行降序排列,优先满足上方的房间即可. 代码纵览 /* Title:HDOJ.1009 Author…
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 requires F[i] pound…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1009 FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 93676    Accepted Submission(s): 32566 Problem Description FatMouse prepared M…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1009 FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 92493    Accepted Submission(s): 32082 Problem Description FatMouse prepared M…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43381    Accepted Submission(s): 14499 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats gu…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 36632    Accepted Submission(s): 12064 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats gu…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 42953    Accepted Submission(s): 14336 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45213    Accepted Submission(s): 15137 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats gu…
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…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 63198 Accepted Submission(s): 21342 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guardin…