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

Common Board

how can the program get the asnwer in seconds?(problem 1107)
Posted by Mao YanDong 12 Aug 2001 12:24
THis program cost even 20 senconds.
program style;
  var
    i,j:word;
  begin
    for i:=1 to 50000 do
      for j:=1 to i do
        begin
        end;
  end.
Re: how can the program get the asnwer in seconds?(problem 1107)
Posted by LYS 13 Aug 2001 07:41
Only the first "for" is needed, though.
You must read and write output at the same time.
> THis program cost even 20 senconds.
> program style;
>   var
>     i,j:word;
>   begin
>     for i:=1 to 50000 do
>       for j:=1 to i do
>         begin
>         end;
>   end.
>