航电ac 1009 FatMouse' TradeFatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12577 Accepted Submission(s): 3707Problem DescriptionFatMouse prepared M pounds of cat food, ready

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 09:00:38
航电ac 1009 FatMouse' TradeFatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12577    Accepted Submission(s): 3707Problem DescriptionFatMouse prepared M pounds of cat food, ready
xUMD+ŢMḟE0bfiCn͸ 8Ӟq?1 T8!q"u{*7R}8eLז߇K2~kz)$OaNpOg0x®+Cڬ7Y|0I?R;VEZ!syr<gF/J.CnS#*kr2bAkY9Au,[/䯻wM~#-48VQeL&GVRxT+DŽBXٵ6:35n,s0ZK;Z#<P O;n,0a/ja~֦VO4)kuk,}KP>@8i #aɝ=`{wV&rJغV^Wp`1"U7c8+BxqZhW\Qk]X{!/W/%0~M^CzA6Z>VUVX˕uDU"e E_T- Jzp+īK5$Ͻ @;@,*Nl}(!MnxJ1UɰήX9/bqG}lREz,Q i6䝢x‘X$9#H2 URnXa꿓KtVIҲ}0v>kӰ Lg=l@4oB6?CP㸁,l뛷_w7~Oo}]Ҳn _6#FU m(/563T'zhEKtHb!%X,{ p9E^I;AN£^?(Aq

航电ac 1009 FatMouse' TradeFatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12577 Accepted Submission(s): 3707Problem DescriptionFatMouse prepared M pounds of cat food, ready
航电ac 1009 FatMouse' Trade
FatMouse' Trade
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12577 Accepted Submission(s): 3707
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] 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.

Input
The input consists of multiple test cases. Each test case begins with a line containing two non-negative integers M and N. Then N lines follow, each contains two non-negative integers J[i] and F[i] respectively. The last test case is followed by two -1's. All integers are not greater than 1000.

Output
For each test case, print in a single line a real number accurate up to 3 decimal places, which is the maximum amount of JavaBeans that FatMouse can obtain.

Sample Input
5 3
7 2
4 3
5 2
20 3
25 18
24 15
15 10
-1 -1

Sample Output
13.333
31.500
我的代码:
#include
main(){
int n,i,k;
float j[1001],f[1001],s[1001],t1,t2,m;
double max;
while(scanf("%f%d",&m,&n)&&(n!=-1||m!=-1)){
max=0;
for(i=0;i

航电ac 1009 FatMouse' TradeFatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12577 Accepted Submission(s): 3707Problem DescriptionFatMouse prepared M pounds of cat food, ready
#include
using namespace std;
int k[1001],f[1001];
double ma[1001];
int main()
{double m,n;
while(cin>>m>>n,m!=-1,n!=-1)
{for(int i=1;i>k[i]>>f[i];
ma[i]=double(k[i])/f[i];
}
for(i=1;i

航电ac 1009 FatMouse' TradeFatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12577 Accepted Submission(s): 3707Problem DescriptionFatMouse prepared M pounds of cat food, ready 杭电ACM 第1009题 FatMouse' TradeProblem DescriptionFatMouse 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 Ja 杭电ACM1084,AC不了 杭电ACM FatMouse' Trade算法题Problem DescriptionFatMouse 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 J 杭电 oj FatMouse' Trade原题连接:代码太长,不能发,考虑到了catfood 可能为0的情况,但是还是一直wa给个代码的连接吧,http://hi.baidu.com/%E6%88%91%E6%83%B3%E6%9C%89%E4%B8%AA%E4%BF%A1%E4%BB%B0/blog/item/6a609243435479208 C语言编程题 FatMouse' TradeFatMouse' TradeTime Limit:1000MS Memory Limit:65536KTotal Submit:395 Accepted:95 Description FatMouse prepared M pounds of cat food,ready to trade with the cats guarding the warehouse containing his favorite food,JavaB 建筑弱电图纸里面的MT25 CC AC 杭电acm怎么查看自己ac过的代码 杭电2008 题,为什么不能AC,我自己运行没错啊? 数电:F=AB+AC+非B非C+非A非B急F=AB+AC+非B非C+非A非B 数电 (AB+BC+AC)(A+B+C)=?前面是(AB+BC+AC)的非 与上(A+B+C) 汽车空调AC开关接法今天装完货车空调 什么都好的 就是AC没电过来 不知道有谁知道的 继电器我接的是 压缩机一根 电源线一根 AC控制一根 还有打铁 就是AC没电过来 控制不了 AC我一开始2根线 延长等腰三角形ABC的腰BA至电D,使AD=AB,延长腰CA至电E,使AE=AC,连结CD、DE、EB,求证四边形BCDE是矩形延长等腰三角形ABC的腰BA至电D,使AD=AB,延长腰CA至电E,使AE=AC,连结CD、DE、EB,求证:四边形BCDE是矩 AC 常开 220V接近开关,当棕色线接正极时,蓝色线为什么有电,也是正极? 高中物理 电场 电势能 电势差 速度 时间 位移 经典题型 请提供详解 过程如图 为什么选AC呢? ac ac AC