题解

129 条题解

  • 0
    @ 2008-10-01 10:16:35

    严重鄙视出题的,那个cow不要改成bird输出

  • 0
    @ 2008-10-01 09:41:14

    字串是大于300的!!!!!!!!

  • 0
    @ 2008-10-01 09:19:42

    这个题比赛的时候测得了零分,现在再测AC?谁能来解释一下?

  • 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

信息

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