题解

129 条题解

  • 0
    @ 2008-10-01 09:16:48

    居然输出的是转换前的字符串

  • 0
    @ 2008-10-01 08:55:55

    program t1;

    var a:array[1..3000] of ansistring;

    ttpp,

    rpc,tmp:ansistring;

    s,tf,ttf,n,max,i,j:longint;

    begin

    max:=0;

    readln(n);

    for i:=1 to n do begin

    readln(tmp);

    a[i]:='';

    for j:=length(tmp) downto 1 do begin

    a[i]:=a[i]+tmp[j];

    end;

    end;

    for i:=1 to n do begin

    ttpp:=a[i];

    tf:=pos('jszxoier',a[i]);

    if tf0 then begin

    ttf:=pos('cow',a[i]);

    while ttf0 do begin

    delete(a[i],ttf,3);

    insert('bird',a[i],ttf);

    ttf:=pos(a[i],'cow');

    end;

    s:=0;

    for j:=1 to length(a[i]) do begin

    if a[i][j]='r' then inc(s,5);

    if a[i][j]='p' then inc(s,5);

    if jlength(a[i]) then if (a[i][j]='r') and (a[i][j+1]='p') then inc(s,20);

    end;

    if (s>max)or ( (s=max) and (length(rpc)>length(a[i])) )

    then begin

    max:=s;

    rpc:=ttpp;

    end;

    end;

    end;

    for i:=length(rpc) downto 1 do

    write(rpc[i]);

    writeln;

    writeln(max);

    end.

  • 0
    @ 2008-10-01 09:45:03

    为什么我第16个点过不了?

    第16个点有什么特别么?

  • 0
    @ 2008-09-21 13:57:13

    地下室

  • 0
    @ 2008-09-21 13:55:34

    地板

  • 0
    @ 2008-09-21 08:56:30

    divano

  • -1
    @ 2009-10-10 22:15:33

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    ___|\__|\__|\__|\__|\__|\__|\__|\__|\__|\__|\__|\__|

    太Rp了。我用血的代价告诉大家:

    不要忘拷斜杠'\0'

    for( j = 0; j

  • -1
    @ 2009-10-31 10:55:28

    乍似AC

    编译通过...

    ├ 测试数据 01:运行超时|无输出...

    ├ 测试数据 02:运行超时|无输出...

    ├ 测试数据 03:运行超时|无输出...

    ├ 测试数据 04:运行超时|无输出...

    ├ 测试数据 05:运行超时|无输出...

    ├ 测试数据 06:运行超时|无输出...

    ├ 测试数据 07:运行超时|无输出...

    ├ 测试数据 08:运行超时|无输出...

    ├ 测试数据 09:运行超时|无输出...

    ├ 测试数据 10:运行超时|无输出...

    ├ 测试数据 11:运行超时|无输出...

    ├ 测试数据 12:运行超时|无输出...

    ├ 测试数据 13:运行超时|无输出...

    ├ 测试数据 14:运行超时|无输出...

    ├ 测试数据 15:运行超时|无输出...

    ├ 测试数据 16:运行超时|无输出...

    ├ 测试数据 17:运行超时|无输出...

    ├ 测试数据 18:运行超时|无输出...

    ├ 测试数据 19:运行超时|无输出...

    ├ 测试数据 20:运行超时|无输出...

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

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

  • -1
    @ 2009-10-07 14:41:02

    这题很简单,只要细心,看清每个细节,

    我用string就很简单的过了

    程序不长,只有60行左右,真的很水

    第一次提交,我忘删文件了

    第二次提交,我输错验证码了

    可怜的第三次,我终于ac了

    奋斗了2天,我晕倒了

    string处理起来会很方便,特别是一些简单的命令,直接替换,删除,很好用的

    -_-!!,大家努力!1!1!!!!!!!!

信息

ID
1454
难度
7
分类
字符串 | 模拟 点击显示
标签
(无)
递交数
2648
已通过
475
通过率
18%
被复制
2
上传者