吐血之后···大牛看看错(orz···)

记录号 Flag 得分 记录信息 环境 评测机 程序提交时间

R1215767 Unaccepted 20 From qzssy5618-

  P1217 FPC Vivid Puppy 2009-4-20 18:34:40

编译通过...

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

├ 测试数据 02:运行超时|格式错误...

├ 测试数据 03:运行超时|格式错误...

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

├ 测试数据 05:运行超时|格式错误...

├ 测试数据 06:运行超时|格式错误...

├ 测试数据 07:运行超时|格式错误...

├ 测试数据 08:运行超时|格式错误...

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

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

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

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

源代码:

var

s:ansistring;

x,y:integer;

i:longint;

begin

readln(s);

for i:=1 to length(s) do

if s[i]'E'

then begin

if s[i]='W'

then inc(x)

else inc(y);

if ((x>=11)or(y>=11))and((x-y>=2)or(y-x>=2))

then if x>=11

then begin

writeln(x,':',y);

x:=0;

y:=0;

end

else begin

writeln(x,':',y);

x:=0;

y:=0;

end;

end

else begin

writeln(x,':',y);

break;

end;

writeln;

x:=0; y:=0;

for i:=1 to length(s) do

if s[i]'E'

then begin

if s[i]='W'

then inc(x)

else inc(y);

if ((x>=21)or(y>=21))and((x-y>=2)or(y-x>=2))

then if x>=21

then begin

writeln(x,':',y);

x:=0;

y:=0;

end

else begin

writeln(x,':',y);

x:=0;

y:=0;

end;

end

else begin

writeln(x,':',y);

break;

end;

end.

3 条评论

  • @ 2014-08-07 10:04:47

    var
    s:ansistring;
    c:char;
    w11,l11,w21,l21:longint;
    i:longint;
    begin
    w11:=0; l11:=0; w21:=0; l21:=0;
    s:='';
    while true do
    begin
    read(c);
    if c='E' then break;
    s:=s+c;
    end;
    for i:=1 to length(s) do
    begin
    if s[i]='W' then inc(w11);
    if s[i]='L' then inc(l11);
    if abs(w11-l11)>=2 then
    if (w11>=11)or(l11>=11) then begin
    writeln(w11,':',l11);
    w11:=0; l11:=0;
    end;
    end;
    writeln(w11,':',l11);
    writeln;
    for i:=1 to length(s) do
    begin
    if s[i]='W' then inc(w21);
    if s[i]='L' then inc(l21);
    if abs(w21-l21)>=2 then
    if (w21>=21)or(l21>=21) then begin
    writeln(w21,':',l21);
    w21:=0; l21:=0;
    end;
    end;
    writeln(w21,':',l21);
    end.

  • @ 2013-09-08 15:52:16

    好长。。。

  • @ 2009-05-08 16:25:51

    怎么···人呢???

    rt··

  • 1

信息

ID
1217
难度
7
分类
字符串 点击显示
标签
递交数
18613
已通过
4247
通过率
23%
被复制
33
上传者