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

Filippov Nickolas SSAU#2's AC program is HERE!
Posted by Nickolas 20 Feb 2003 20:42
program spellchecker;
 var ch:char;
     state:integer;
     errors:integer;
    begin
    state:=0;
    errors:=0;
    while not eof do begin
      read(ch);
      case state of
        0: begin
                         if ch in ['a'..'z']
then inc(errors);
             if ch in ['a'..'z']+['A'..'Z'] then state:=1;
                   end;
        1: begin
             if ch in ['A'..'Z'] then inc(errors);
             if not (ch in ['a'..'z']+['A'..'Z']) then
                  if ch in ['.','!','?'] then state:=0 else state:=2;
           end;
        2: begin
             if ch in ['a'..'z']+['A'..'Z'] then state:=1;
                if ch in ['.','!','?'] then state:=0;
           end;
      end;
    end;
    writeln(errors);
end.
Re: Filippov Nickolas SSAU#2's AC program is HERE!
Posted by Tang RZ 3 Jun 2004 11:20
What about this?
"This is a BIG one."
Your program output 2.
It is correct answer
Posted by Vlad Veselov 3 Jun 2004 17:24
Re: Filippov Nickolas SSAU#2's AC program is HERE!
Posted by Fast Coder 14 Apr 2005 20:28
STOP sending here your solution!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!