交了N次

交了N次

、├ 测试数据 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:答案错误... ├ 标准行输出

 ├ 错误行输出

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

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

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

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

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

2 条评论

  • @ 2013-09-20 23:12:37

    var
    n,i,j,l,rr,cowrp:integer; a:ansistring;
    s:array[1..3000]of ansistring;
    begin
    readln(n);l:=301;cowrp:=0;
    for i:=1 to n do
    begin
    readln(s[i]);
    if pos('reioxzsj',s[i])=0 then continue
    else rr:=0;
    for j:=1 to length(s[i])-2 do
    if s[i,j]='w' then
    if s[i,j+1]='o' then
    if s[i,j+2]='c' then rr:=rr+5;
    for j:=1 to length(s[i]) do
    if s[i,j]='r' then rr:=rr+5
    else if s[i,j]='p' then
    begin
    rr:=rr+5;
    if j<>length(s[i]) then
    if s[i,j+1]='r' then rr:=rr+20;
    end;
    if rr>cowrp then
    begin cowrp:=rr;l:=length(s[i]);a:=s[i]; end
    else if rr=cowrp then
    if l>length(s[i]) then a:=s[i];
    end;
    writeln(a);writeln(cowrp);
    end.

  • @ 2013-09-20 23:11:33

    表示这道题好水…………有处细节错了吧
    附暴力代码:
    program p1454;
    var
    n,i,j,l,rr,cowrp:integer; a:ansistring;
    s:array[1..3000]of ansistring;
    begin
    readln(n);l:=301;cowrp:=0;
    for i:=1 to n do
    begin
    readln(s[i]);
    if pos('reioxzsj',s[i])=0 then continue
    else rr:=0;
    for j:=1 to length(s[i])-2 do
    if s[i,j]='w' then
    if s[i,j+1]='o' then
    if s[i,j+2]='c' then rr:=rr+5;
    for j:=1 to length(s[i]) do
    if s[i,j]='r' then rr:=rr+5
    else if s[i,j]='p' then
    begin
    rr:=rr+5;
    if j<>length(s[i]) then
    if s[i,j+1]='r' then rr:=rr+20;
    end;
    if rr>cowrp then
    begin cowrp:=rr;l:=length(s[i]);a:=s[i]; end
    else if rr=cowrp then
    if l>length(s[i]) then a:=s[i];
    end;
    writeln(a);writeln(cowrp);
    end.

  • 1

信息

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