167 条题解

  • 0
    @ 2009-09-09 15:37:27

    编译通过...

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

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

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

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

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

    ├ 测试数据 06:运行超时...

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

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

    ├ 测试数据 09:运行超时...

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

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

    Unaccepted 有效得分:80 有效耗时:0ms

    program shztl;

    var

    m,s,t,i,j,max,min:longint;

    a,f:array[0..300001] of longint;

    begin

    readln(m,s,t);

    i:=0;f[0]:=0;

    while i=10 then

    begin

    i:=i+1;

    f[i]:=f+60;

    m:=m-10;

    end

    else

    begin

    i:=i+1;

    f[i]:=f;

    m:=m+4;

    end;

    a[i]:=i;

    end;

    max:=0;min:=t+1;

    for i:=1 to t do

    begin

    while (f[i]=s then

    begin

    if a[i]max then max:=f[i];

    end;

    if min

  • 0
    @ 2009-09-06 15:29:19

    第1000AC者感谢我!

    我乃第999AC者

  • 0
    @ 2009-09-05 10:15:50

    有规律可找,顺便说一下魔兽别玩的太多了

  • 0
    @ 2009-08-29 15:36:05

    贪心+骗数据=AC!

  • 0
    @ 2009-08-28 11:17:43

    30%的数据满足:1

  • 0
    @ 2009-08-26 17:15:33

    var

    m,s,t,i,q:longint;

    function tt(t:integer):integer;

    var

    t1:integer;

    begin

    t1:=t;

    while t1 mod 40 do inc(t1);

    tt:=t1;

    end;

    begin

    readln(m,s,t);

    q:=0;

    for i:=1 to t do

    begin

    if q>=s then begin writeln('Yes');writeln(i-1);halt; end;

    if m>=10 then begin q:=q+60;m:=m-10;continue; end;

    if ((s-q)/17

  • 0
    @ 2009-08-26 10:51:16

    这题应该划分到贪心部分去。。。

  • 0
    @ 2009-08-24 20:08:44

    一次AC。。。典型的DP

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

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    program p1431;

    var a:array[1..2,0..300000] of longint;

    b:array[0..300000] of longint;

    m,s,t,i:longint;

    begin

    readln(m,s,t);

    fillchar(a,sizeof(a),0);

    fillchar(b,sizeof(b),0);

    a[2,0]:=m;

    for i:=1 to t do begin

    if a[2,i-1]>=10 then begin

    a[1,i]:=a[1,i-1]+60;

    a[2,i]:=a[2,i-1]-10;

    end else begin

    a[1,i]:=a[1,i-1];

    a[2,i]:=a[2,i-1]+4;

    end;

    if b+17>a[1,i] then b[i]:=b+17 else b[i]:=a[1,i];

    if b[i]>=s then begin

    writeln('Yes');

    writeln(i);

    halt;

    end;

    end;

    writeln('No');

    writeln(b[t]);

    end.

  • 0
    @ 2009-08-24 17:09:14

    program escape(input,output);

    var ss,m,s,t,l,shu:longint;

    r:real;

    begin

    assign(input,'escape.in');

    reset(input);

    assign(output,'escape.out');

    rewrite(output);

    readln(m,s,t);

    ss:=t;

    l:=0;

    while ((m div 10)>0) and (l0) do

    begin

    m:=m-10;

    l:=l+60;

    t:=t-1;

    end;

    m:=(m div 2)*2;

    while (t>0) and (l=7) and (s-l>119)

    then begin

    t:=t-7;

    l:=l+120;

    end

    else begin

    r:=(s-l)/17;

    if r=trunc(r)

    then shu:=trunc(r)

    else shu:=trunc(r)+1;

    if t>=shu

    then t:=t-shu

    else begin

    shu:=t;

    t:=0;

    end;

    l:=l+17*shu;

    end;

    2:if (t>=3) and (s-l>51)

    then begin

    t:=t-3;

    l:=l+60;

    m:=0;

    end

    else begin

    r:=(s-l)/17;

    if r=trunc(r)

    then shu:=trunc(r)

    else shu:=trunc(r)+1;

    if t>=shu

    then t:=t-shu

    else begin

    shu:=t;

    t:=0;

    end;

    l:=l+17*shu;

    end;

    4:if (t>=3) and (s-l>51)

    then begin

    t:=t-3;

    l:=l+60;

    m:=2;

    end

    else begin

    r:=(s-l)/17;

    if r=trunc(r)

    then shu:=trunc(r)

    else shu:=trunc(r)+1;

    if t>=shu

    then t:=t-shu

    else begin

    shu:=t;

    t:=0;

    end;

    l:=l+17*shu;

    end;

    6:if (t>=2) and (s-l>34)

    then begin

    t:=t-2;

    l:=l+60;

    m:=0;

    end

    else begin

    r:=(s-l)/17;

    if r=trunc(r)

    then shu:=trunc(r)

    else shu:=trunc(r)+1;

    if t>=shu

    then t:=t-shu

    else begin

    shu:=t;

    t:=0;

    end;

    l:=l+17*shu;

    end;

    8:if (t>=2) and (s-l>34)

    then begin

    t:=t-2;

    l:=l+60;

    m:=2;

    end

    else begin

    r:=(s-l)/17;

    if r=trunc(r)

    then shu:=trunc(r)

    else shu:=trunc(r)+1;

    if t>=shu

    then t:=t-shu

    else begin

    shu:=t;

    t:=0;

    end;

    l:=l+17*shu;

    end

    end;

    if l>=s

    then begin

    writeln('Yes');

    writeln(ss-t);

    end

    else begin

    writeln('No');

    writeln(l);

    end;

    close(input);

    close(output);

    end.

    超长程序,类于交表…………

    写完之后,发现手……………

  • 0
    @ 2009-08-19 16:33:58

    楼下的看不懂呃......

  • 0
    @ 2009-08-19 16:01:14

    哈哈哈

  • 0
    @ 2009-08-19 15:55:13

    var i,j,k,m,s,t,l,q,mm:longint;

    f:array[1..100,1..100] of longint;

    begin

    readln(m,s,t);

    q:=0;

    l:=0;

    for i:=1 to t do

    begin

    if m

  • 0
    @ 2009-08-17 21:57:45

    同样的程序一次90一次AC~~

    思路就是假设只能闪烁和休息~

    然后最后加上走路~

    秒杀~

  • 0
    @ 2009-08-17 08:39:32

    var

    a,b,i,sum,time,mana:longint;

    begin

    readln(mana,sum,time);

    a:=0;

    b:=0;

    i:=0;

    while i=sum then

    begin

    writeln('Yes');

    writeln(i);

    exit;

    end;

    end;

    writeln('No');

    writeln(a);

    end.

  • 0
    @ 2009-08-16 17:10:36

    明明是10^8,还有此题只要贪心就可以了。还好今天没下雨,要不然新闻会说。一名OI在雷电下牺牲

  • 0
    @ 2009-08-16 00:03:06

    哈哈哈哈,第888个AC~~~~

  • 0
    @ 2009-08-14 18:28:48

    c040120大牛啊。。。。。。

    DP太厉害了~~

  • 0
    @ 2009-08-13 14:06:27

    简单dp

    #include

    #include

    int main()

    {

    int m,s,t,tmin,s1,s2,i;

    scanf("%d %d %d",&m,&s,&t);

    //printf("%d %d %d",m,s,t);

    s1=0;s2=0;

    for(i=1;i=10)

    {

    s2=s2+60;

    m=m-10;

    }

    else

    m=m+4;

    if(s1=s)

    {

    tmin=i;

    break;

    }

    }

    if(s1>=s)

    printf("Yes\n%d",tmin);

    if(s1

  • 0
    @ 2009-08-12 22:31:22

    在此提醒各位DP同仁:

    一定要好好想想初状态!!!!

    我因此Unaccepted90分好几回!

    想全了,也就Accepted了。

  • 0
    @ 2009-08-12 15:05:54

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    出题的玩魔兽玩多了......

    楼下注意:

    记得我玩那个战役的时候,守望者LV5,复仇天神没有......

信息

ID
1431
难度
5
分类
动态规划 | 背包 点击显示
标签
递交数
6154
已通过
1916
通过率
31%
被复制
22
上传者