Sunday, September 28, 2014

ACM 1079. Maximum / Максимум

There might some pattern in this sequence but just because n<99999 then I suggest building the sequence and then calculate the maximums. I suggest precalculating all the answers before processing the input. You can keep an additional array of answer ANS[100000] where ANS[i] shows max (A[1],A[2],....A[i]).


       FULL SOURCE CODE

No comments:

Post a Comment