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 1038. Spell Checker

Can Somebody check only if i'm reading correct the input, please ???
Posted by uuuuuuu 20 Sep 2002 21:03
i think that my program is rather good but can You check if it is
reading good the input coz i always get WA ;(((( PLEASE

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
var
m:string[250];
zn:char;
d,i,c,z:byte;
bledy:longint;
zdanienowe,nowywyraz:byte;
procedure sprawdz;

begin
d:=length(m);
i:=0;
                while i<d do
                begin
                inc(i);
                if (ord(m[i])=46)or(ord(m[i])=33)or(ord(m[i])=63)
then zdanienowe:=1
                else  if (ord(m[i])=0)or(ord(m[i])=32) then
                         begin
                         nowywyraz:=1;
                         c:=1
                      end
                else if (ord(m[i])>63)and(ord(m[i])<91)or(ord(m[i])
<123)and(ord(m[i])>96)then

                begin

                  if (zdanienowe=1) then
                  begin
                  if (ord(m[i])<123)and(ord(m[i])>96) then inc(bledy);
                  zdanienowe:=0;
                  end
                  else if nowywyraz=1 then
                  begin
                  nowywyraz:=0;
                  c:=0
                  end
                  else if (ord(m[i])>63)and(ord(m[i])<91) then inc
(bledy);
                  end
                else begin nowywyraz:=1;c:=1; end;
               if c=0 then nowywyraz:=0;
               end;
end;
begin
zdanienowe:=1;
>>>>while not eof do
>>>>begin
>>>>              if eoln then
>>>>                      begin
>>>>                      readln;
>>>>                      sprawdz;
>>>>                      m:='';
>>>>                      nowywyraz:=1;
>>>>                      end;
>>>>read(zn);
>>>>m:=m+zn;
>>>>end;
writeln(bledy);
end.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;
Re: Can Somebody check only if i'm reading correct the input, please ???
Posted by Locomotive 19 Dec 2002 15:00
Do you still need help?
Re: Can Somebody check only if i'm reading correct the input, please ???
Posted by Dilyan 2 May 2005 15:51
the string does not have enough capacity for the whole input

Edited by author 29.06.2005 16:35