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

Обсуждение задачи 1297. Палиндромы

Problem of input!!! {Pascal}
Послано 33687GH 18 фев 2005 18:55
How can we read, not using CRT and ASM???
I have truest solution, but can not read more then 255 of char!!!
How can you read using CRT? :P
Послано Vlad Veselov [PMG17,Vinnitsa - KNU,Kiev] 18 фев 2005 19:16
Something like this:
Var A  : Array 0 .. 1000] Of Char;
    Ch : Char;
    L  : Word;
BEGIN
 L := 0;
 Read(Ch);
 While UpCase(Ch) In ['A'..'Z'] Do
  begin
   Inc(L);
   A[L] := Ch;
   Read(Ch);
  end;
 ...
END.
Re: How can you read using CRT? :P
Послано 33687GH 18 фев 2005 21:29
Try to test it for example with this:
'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
{More then 256!!! It will be ring!!! It input at first string, and then read chars, THAT IS THE MAIN PROBLEM}
Re: How can you read using CRT? :P
Послано ronobe (aka oberon) 18 фев 2005 21:33
p1. Change your name and motto. Your judge ID should be secret.
p2. When you compile program you obtain something like a.exe
then input file is redirected to your program.
a.exe < test.in
You won't get any ring, since ring occures only when you read via keyboard.
Re: How can you read using CRT? :P
Послано 33687GH 18 фев 2005 21:37
But I can not get AC without it!!!
Re: How can you read using CRT? :P
Послано Vladimir Yakovlev (USU) 19 фев 2005 01:50
Use {$H+} directive and you'll get huge strings.
Re: How can you read using CRT? :P
Послано 33687GH 19 фев 2005 14:55
Thank you very much!!!