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 1219. Symbolic Sequence

How should I output?
Posted by Dmitry 'Diman_YES' Kovalioff 27 Oct 2002 11:26
As you can see the task is to output the sequence consists of 1000000
symbols. I output exactly 1000000 symbols one by one (...Write
(sym)...Write(sym)...Write(sym)...), buf after 0.04 seconds I
receive "Output Limit". What does it mean and how should I output the
sequence?
Please, help me!
Re: How should I output?
Posted by Илья Гофман (Ilya Gofman) 28 Oct 2002 19:33
That simply means that you do NOT output 1 million chars!
I have the same problem, and I can't solve it. But if I decrease the
number of outputs then I get WA.
Re: How should I output?
Posted by Samball 29 Oct 2002 13:54

I used
putchar(buffer[j]);
instead of printf("%s",buffer)
and I got accepted.

I really don't know why.


> As you can see the task is to output the sequence consists of
1000000
> symbols. I output exactly 1000000 symbols one by one (...Write
> (sym)...Write(sym)...Write(sym)...), buf after 0.04 seconds I
> receive "Output Limit". What does it mean and how should I output
the
> sequence?
> Please, help me!
This is my program.Can you make it shorter?
Posted by Tony 29 Oct 2002 14:50
var
 i:longint;
begin
 randomize;
 for i:=1 to 1000000 do write(chr(ord('a')+random(26)));
end.
Re: This is my program.Can you make it shorter?
Posted by Dmitry 'Diman_YES' Kovalioff 29 Oct 2002 16:39
You are GENIUS!!! The god of programming :)) I think your solution is
really perfect!
my program is very like of his :-)
Posted by aaakkk 30 Oct 2002 10:36
> You are GENIUS!!! The god of programming :)) I think your solution
is
> really perfect!
I MADE!!!! -->Re: This is my program.Can you make it shorter?<--
Posted by Locomotive 19 Dec 2002 20:53
I made:
var
 i:longint;
begin
 randomize;
 for i:=1 to 1000000 do write(chr(97+random(26)));
end.

use 97 instead of ord('a')!!!
I still believe u r geinus
Aidin
Re: I MADE!!!! -->Re: This is my program.Can you make it shorter?<--
Posted by Smilodon_am 19 Nov 2008 14:17
To make this program shorter one can substistute "1000000" on 1e6.
Re: I MADE!!!! -->Re: This is my program.Can you make it shorter?<--
Posted by BlackShark 3 Jan 2009 01:37
P.S. To Smilodon_am: You can't use 1e6 with the FOR cycle because it needs only INTEGER expressions.

Edited by author 03.01.2009 01:40

Edited by author 03.01.2009 01:41
Re: I MADE!!!! -->Re: This is my program.Can you make it shorter?<--
Posted by Nikoloz 3 Feb 2011 22:43
I also solved like this but the way I got to this solution was kind of intuitive, so I am not still sure why this solution gets AC, I can't prove it. Do you have any proof why it does so?