lys 2012-08-15 20:34:00
点我顶贴
收藏
删除
const maxn=100000;
var a:array[1..maxn,1..2] of longint;
s1,s2,o1,o2,t:longint;
procedure i;
var c:char;begin
repeat
read(c);
if c='W' then
begin
inc(s1);
inc(o1);
end;
if c='L' then
begin
inc(s2);
inc(o2);
end;
if (s1>=11)or (s2>=11) and(abs(s1-s2)>1)or (c='E')
then
begin
writeln(s1,':',s2);
s1:=0;
s2:=0;
end;
if (o1>=21)or (o2>=21)and(abs(o1-o2)>1) or (c='E')
then
begin
inc(t);
a[t,1]:=o1;
a[t,2]:=o2;
o1:=0;
o2:=0;
end;
until c='E';
end;
procedure j;
var i:longint;
begin
for i:=1 to t do
writeln(a[i,1],':',a[i,2]);
WRITELN;
end;
begin
i;
j;
end.