|
|
back to boardProblem of input!!! {Pascal} Posted by 33687GH 18 Feb 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 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 Posted by 33687GH 18 Feb 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 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 Posted by 33687GH 18 Feb 2005 21:37 But I can not get AC without it!!! Re: How can you read using CRT? :P Use {$H+} directive and you'll get huge strings. Re: How can you read using CRT? :P Posted by 33687GH 19 Feb 2005 14:55 Thank you very much!!! |
|
|