ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1226. esreveR redrO

Let's shut "No" to arrays and strings! I use only 3 variables and got accepted. Here is my solution:
Posted by Slava Medvedev(PetrSU) 4 Nov 2002 19:43
var
k,l:char;
procedure use;
var
c:char;
begin
read(c);
if (c in ['a'..'z'])or(c in ['A'..'Z'])or(c=#45) then
begin
use;
if c<>#45 then write(c);
end else l:=c;
end;
begin
while not eof do
begin
while (not eoln)and(not eof) do
begin
read(k);
if (k in ['a'..'z'])or(k in ['A'..'Z']) then
begin
use;
if k<>#45 then write(k);
write(l);
end else write(k);
end;
readln;
writeln;
end;
end.
Re: Let's shut "No" to arrays and strings! I use only 3 variables and got accepted. Here is my solution:
Posted by JL Wang 8 Nov 2002 18:28
> var
> k,l:char;
> procedure use;
> var
> c:char;
> begin
> read(c);
> if (c in ['a'..'z'])or(c in ['A'..'Z'])or(c=#45) then
> begin
> use;
> if c<>#45 then write(c);
> end else l:=c;
> end;
> begin
> while not eof do
> begin
> while (not eoln)and(not eof) do
> begin
> read(k);
> if (k in ['a'..'z'])or(k in ['A'..'Z']) then
> begin
> use;
> if k<>#45 then write(k);
> write(l);
> end else write(k);
> end;
> readln;
> writeln;
> end;
> end.

u AC?
WA!
Re: Let's shut "No" to arrays and strings! I use only 3 variables and got accepted. Here is my solution:
Posted by Slava Medvedev(PetrSU) 9 Nov 2002 17:24
I got an Accept and then was rejudged to a Wrong Answer.
I don't know where is a bug. If you will find it tell me please.
Re: Let's shut "No" to arrays and strings! I use only 3 variables and got accepted. Here is my solution:
Posted by JL Wang 10 Nov 2002 16:49
> I got an Accept and then was rejudged to a Wrong Answer.
> I don't know where is a bug. If you will find it tell me please.

There was an BUG in judge system when you first judge it, because the
test data was not ready then.
And that means your solution was wrong, I'm afraid.