-
题目描述:
-
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] pounds of cat food. FatMouse does not have to trade for all the JavaBeans in the room, instead, he may get J[i]* a% pounds of JavaBeans if he pays F[i]* a% pounds of cat food. Here a is a real number. Now he is assigning this homework to you: tell him the maximum amount of JavaBeans he can obtain.
九度题目1433:FatMouse(贪心算法)
最新推荐文章于 2019-06-26 08:51:59 发布
FatMouse用M磅猫粮换取存有最爱食物JavaBean的仓库,仓库有N个房间,每个房间需用F[i]磅猫粮换取J[i]磅JavaBeans,付出F[i]*a%磅猫粮可得J[i]*a%磅JavaBeans。求解FatMouse能获得的最大JavaBeans总量。
摘要由CSDN通过智能技术生成