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 1047. Simple Calculations

The answer
Posted by Li, Yi 17 Aug 2001 09:26
                                     n
              (A[n+1] - A[0] - 2 * Sigma(k * c[n - k + 1]))
                                    k=1
A[1] = A[0] + ----------------------------------------------
                                  n + 1
Re: The answer
Posted by VladG 22 Oct 2002 22:09
How, did you discover this expression?



>                                      n
>               (A[n+1] - A[0] - 2 * Sigma(k * c[n - k + 1]))
>                                     k=1
> A[1] = A[0] + ----------------------------------------------
>                                   n + 1
Re: The answer
Posted by Antikr 4 May 2007 02:45
........................................................... n
..................... (A[n+1] - A[0] - 2 * Sigma(k * c[n - k + 1]))
......................................................... k=1
 A[1] = A[0] + ---------------------------------------------
...................................................... n + 1

did you mean this??

Edited by author 04.05.2007 02:46
Re: The answer
Posted by Romko [Lviv NU] 17 Oct 2007 17:46
In this problem, you can also use simply binary search, note that :
A[i] = 2*(A[i-1]+C[i])-A[i-2];