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

AC with 0.001 sec
Posted by Lega 16 May 2005 01:09
init array and simple loop !

[code deleted]

Edited by moderator 13.02.2007 20:47
Re: AC with 0.001 sec
Posted by Momchil Atanasov 11 Feb 2007 23:56
I think it would be even better if you go through 2*i + 1 and not all the numbers when checking for the maximum....

logic: (all 2*i < 2*i + 1) and (all 2*i <= 2*i - 1 [i>0])