|
|
вернуться в форумProblem of input!!! {Pascal} 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 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 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 Thank you very much!!! |
|
|