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

Show all messages Hide all messages

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.
> 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!
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.
> 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.