ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1038. Проверка орфографии

WA#10 help? please!
Послано Insaf 14 авг 2009 15:28
Please help me with WA#10. Can you give me the test in which my program outputs this WA.

program Project1;
{$LONGSTRINGS ON}
{$APPTYPE CONSOLE}

uses
  SysUtils;

var c,lc:char;
    ans:longint;
    b:boolean;

begin
  {$IFNDEF ONLINE_JUDGE}
  reset(input,'input.txt');
  rewrite(output,'output.txt');
  {$ENDIF}
  ans := 0;
  b := false;
  c := #1;
  while not eof(input) do
  begin
    lc := c;
    read(c);
    if (c in ['a'..'z']) and (not b) then
      inc(ans);
    if (c in ['A'..'Z']) and (lc in (['A'..'Z'] + ['a'..'z'])) then
      inc(ans);
    if not (c in ['.','?','!',' ',#10,#13]) then
      b := true;
    if c in ['.','?','!'] then
      b := false;
  end;
  write(ans);
end.
Re: WA#10 help? please!
Послано Sergey Lazarev (MSU Tashkent) 14 авг 2009 16:41
-a.

Answer is 1, but your program gives 0.
Re: WA#10 help? please!
Послано sos1g3 [TSOGU] 21 авг 2009 19:20
My program give rigth answer for test :

input:
-a.

output:
1

WHY I HAVE WA10????????!!!!!!!!!!!!!!!
Re: WA#10 help? please!
Послано fredAC 31 авг 2009 08:52
if you failed on test 10,try the follwing data or see the item
Posted by Alam Md Mahabub September 27, 2001 14:23
******************************************
Re: Can you give any judge data for which this code gives WA. Posted by SHMAK November 05, 2007 05:17
/***************************************
strange... but there are 5 mistakes:

The old va[R]sag my
Antonesgh..%[s]g4mahng 35tsavx
3mnkxb o o oo A[A] gfsd . [s]dgw a
a[A]
Aa
*********************************
the weild part is that the last sentence doesnot contain
 a full stop, a question-mark or an exclamation mark

Re: WA#10 help? please!
Послано Alexandr Vasilyev 6 июл 2016 16:39
What means '%'?
Re: WA#10 help? please!
Послано alexey.orlov 29 июл 2016 01:22
for me WA10 got away after i added check for digits in my condition to start new word.
e.g. "A0B" have 0 errors