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 1079. Maximum

trouble(pascal)
Posted by Vyacheslav 27 Feb 2011 18:47
what`s wrong?


var n,i,res,c,max:longint;
a:array[0..100000] of integer;
begin
repeat
max:=0;
Readln(n);
a[0]:=0;
a[1]:=1;
for i:=1 to n do
begin
a[2*i]:=a[i];
a[2*i+1]:=a[i]+a[i+1]
end;
for i:=1 to n do
if a[i]>max then max:=a[i];
if n<>0 then Writeln(max);
until n=0;
end.
Re: trouble(pascal)
Posted by Vyacheslav 27 Feb 2011 18:53
i find mistake:
a:array[0..200001] of integer;
this is accepted)