56 条题解

  • 0
    @ 2019-09-07 20:46:19
    //模拟题
    //找出公式来不难做
    //需要注意的是/和*的优先级是一样的(看不懂说明你没错)
    #include<cstdio>
    #include<iostream>
    using namespace std;
    int main()
    {
        double k,x1,x2,x3,x4,a,b,c,d,ans=10000000000.0;
        scanf("%lf%lf%lf%lf%lf",&k,&x1,&x2,&x3,&x4);
        for(a=0;a<=10.0;a+=1.0)
         for(b=0;b<=10.0;b+=1.0)
          for(c=0;c<=10.0;c+=1.0)
           for(d=0;d<=10.0;d+=1.0)
            if(a+b+c+d==k)
             ans=min(ans,(20.0-2.0*a)*x1+(2.0*(100.0-7.0*b)*x2+(100.0-9.0*c)*x3)/((10.0+d)*x4));
        printf("%.3lf",ans);
        return 0; 
    }
    
  • 0
    @ 2015-08-25 09:35:32

    var
    max,sum:double;
    k,x1,x2,x3,x4,i1,i2,i3,i4,v:longint;
    begin
    readln(k,x1,x2,x3,x4);
    max:=maxlongint;
    for i1:=0 to 10 do
    for i2:=0 to 10 do
    for i3:=0 to 10 do
    for i4:=0 to 10 do
    if (i1+i2+i3+i4<=k) then
    begin
    v:=(10+i4*1)*x4;
    sum:=(20-i1*2)*x1+(100-i2*7)*x2*2/v+(100-i3*9)*x3/v;
    if (sum<max) and (v>0) then max:=sum;
    end;
    writeln(max:0:3);
    end.

  • 0
    @ 2015-03-12 12:15:20

    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细仔仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细细细细细仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细细细细细细细细细细细仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细细细细细细细细细细细仔仔仔仔
    仔仔仔仔仔仔仔仔仔仔仔细细细细仔细细细细细细细细细细细仔仔仔仔仔仔仔仔
    仔仔仔仔仔仔仔仔细细细细细细细仔细细细仔仔细细细细细仔仔仔仔仔仔仔仔仔
    仔仔仔细细细细细细细细细细细细仔仔仔仔仔仔细细细细仔仔仔仔仔仔仔仔仔仔
    仔细细细细细细细细细细细细细细仔仔仔仔仔仔细细细细仔仔仔仔仔仔仔仔仔仔
    仔细细细细细细细细细细细细仔仔仔仔仔仔仔细细细细细细细细细细细仔仔仔仔
    仔细细细细细细细细细细细细仔仔仔仔仔仔细细细细细细细细细细细细细细仔仔
    仔仔细细细细细细细细细细仔仔仔仔仔细细细细细细仔仔仔细细细细细细细仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔仔细细细细仔仔仔仔仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔仔细细仔仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔仔细细细细仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔仔细细细细仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔仔细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔仔细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔细细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔细细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔细细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细细仔细细细细仔仔细细细细细仔仔仔
    仔仔仔仔仔仔仔仔细细细细仔仔仔仔细细细仔仔细细细细仔仔细细细细细仔仔仔
    仔仔细细仔仔仔细细细细细仔仔仔仔细细细仔仔细细细仔仔仔细细细细细仔仔仔
    仔仔细细细细细细细细细细仔仔仔仔仔细细仔仔细细仔仔仔仔细细细细细仔仔仔
    仔仔仔细细细细细细细细细仔仔仔仔仔仔仔仔细细细仔仔仔仔细细细细仔仔仔仔
    仔仔仔仔仔细细细细细细细仔仔仔仔仔仔仔仔细细细仔细细细细仔仔仔仔仔仔仔
    仔仔仔仔仔仔细细细细细细仔仔仔仔仔仔仔细细细细仔仔细细细细仔仔仔仔仔仔
    仔仔仔仔仔仔仔仔仔细细细仔仔仔仔仔仔细细细细细仔仔仔细细细细细仔仔仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细细仔仔仔仔仔细细细细细细仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细细仔仔仔仔仔仔细细细细细细细仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细仔仔仔仔仔仔仔仔仔细细细细细细仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔细细细细细仔仔仔仔仔仔仔仔仔仔仔细细细细细仔
    仔仔仔仔仔仔仔仔仔仔仔仔细细细仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔细细细仔仔
    仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔仔

  • 0
    @ 2013-07-30 17:25:07

    一遍AC
    伟大的枚举
    var
    k,ld,cbs,cd,md,i,x1,x2,x3,x4:integer;
    sj:real;
    begin
    read(k,x1,x2,x3,x4);
    sj:=99999999;
    for ld:=0 to 10 do
    for cbs:=0 to 10 do
    for cd:=0 to 10 do
    for md:=0 to 10 do
    if (ld+cbs+cd+md=k) and (((20-ld*2)*x1+(100-cbs*7)*x2*2/((10+md*1)*x4)+(100-cd*9)*x3/((10+md*1)*x4))<sj) then sj:=(20-ld*2)*x1+(100-cbs*7)*x2*2/((10+md*1)*x4)+(100-cd*9)*x3/((10+md*1)*x4);
    write(sj:0:3);
    end.

  • 0
    @ 2009-11-02 21:41:19

    好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水好多水

  • 0
    @ 2009-10-31 17:31:22

    第一次输公式时把速度

    /(10+n)*x4

    应该是

    /((10+n)*x4)

    这错误真高级

  • 0
    @ 2009-10-08 20:48:45

    就是题目难懂

    公式繁杂 水题

  • 0
    @ 2009-09-17 20:50:38

    水题.......

  • 0
    @ 2009-09-12 21:30:36

    .....垃圾题目

  • 0
    @ 2009-09-04 16:09:52

    这个公式太恶心了,我打错WA了N次

  • 0
    @ 2009-09-02 22:17:18

    这道题让我很无语.

  • 0
    @ 2009-08-20 22:41:41

    本人太菜,枚举万岁!

  • 0
    @ 2009-08-19 14:15:32

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    强大的枚举

  • 0
    @ 2009-08-12 14:08:17

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 02:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 03:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 04:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 05:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 06:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 07:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 08:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 09:答案正确... 0ms

    ├ Hint:Very nice!

    ├ 测试数据 10:答案正确... 0ms

    ├ Hint:Very nice!

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:10000 有效耗时:0ms

  • 0
    @ 2009-08-10 16:24:19

    program P1248zlhdjqr;

    var k,x1,x2,x3,x4,a1,a2,a3,a4:integer;

    time,ans:real;

    begin

    read(k,x1,x2,x3,x4);

    ans:=99999;

    for a1:=0 to 10 do

    for a2:=0 to 10 do

    for a3:=0 to 10 do

    for a4:=0 to 10 do

    begin

    if a1+a2+a3+a4time then ans:=time;

    end;

    end;

    write(ans:0:3);

    end.

    这个为什么不能过-.=

  • 0
    @ 2009-08-05 10:23:04

    Var n,x1,x2,x3,x4,s,v:longint;

    i,j,k,l:longint;

    mint,tt,t:extended;

    Function min(a,b:longint):longint;

    Begin if a>b then exit(b);

    exit(a);

    End;

    Begin readln(n,x1,x2,x3,x4);

    mint:=99999999;

    for i:=0 to min(n,10) do

    for j:=0 to min(n-i,10) do

    for k:=0 to min(n-i-j,10) do

    for l:=0 to min(n-i-j-k,10) do

    Begin

    t:=(20-i*2)*x1;

    s:=2*(100-j*7)*x2+(100-k*9)*x3;

    v:=(10+l)*x4;

    tt:=s/v;

    if mint>t+tt then mint:=t+tt;

    end;

    writeln(mint:0:3);

    End.

  • 0
    @ 2009-05-23 15:02:59

    传说中的百鸡问题~~~

  • 0
    @ 2009-05-16 12:21:12

    半年没编程。今天拿这水题练练手~

    要注意的是机器人到球的距离是往返的,要乘2的

    v:=(10+engine*1)*x4;

    st:=(20-light*2)*x1+(100-wave*7)*x2*2/v+(100-touch*9)*x3/v;

    还有就是注意循环从0到10,四重循环,不超时~

  • 0
    @ 2009-05-15 21:17:27

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    program jqr;

    var

    k,ld,cbs,cd,md,i,x1,x2,x3,x4:integer;

    v,t,m:real;

    begin

    read(k,x1,x2,x3,x4);

    m:=100000;

    for ld:=0 to 10 do

    (第一次这儿打成了for ld:=0 to k do,害得我交了2次才AC)

    for cbs:=0 to 10 do

    for cd:=0 to 10 do

    for md:=0 to 10 do

    begin

    if (ld+cbs+cd+mdt) and (t>0) then m:=t;

    end;

    end;

    write(m:0:3);

    end.

  • 0
    @ 2009-04-19 03:30:56

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    #include "stdio.h"

    int main()

    {

    int n,x1,x2,x3,x4,i,j,k,m,s,v;

    double time,min;

    min=2000;

    scanf("%d%d%d%d%d",&n,&x1,&x2,&x3,&x4);

    for(i=0;i

信息

ID
1248
难度
3
分类
模拟 点击显示
标签
递交数
1256
已通过
607
通过率
48%
被复制
5
上传者