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 1066. Garland

I don't understand question
Posted by Remington OKTL 18 Jan 2006 18:04
English:

It's said that H[i]=(H[i-1]+H[i+1])/2, but we know only height of first lamp, so when we try to determine height of second lamp, where from do we take H[3] ??? Don't I unterstand question right ???
  Please explain me, if you can.



Exactly same text in Russian:

Сказано, что H[i]=(H[i-1]+H[i+1])/2, но мы знаем только высоту первой лампочки, а когда мы определяем высоту второй лампочки откуда брать высоту третей H[3] ??? Или я не совсем правильно понял вопрос ???
  Объясните кто-нибудь, пожалуйста.

Edited by author 18.01.2006 18:04
Re: I don't understand question
Posted by wwwwww 19 Jan 2006 01:29
We should minimize height of the last lamp.
Of course each lamp can be at different heights.
H[3]=H[2]*2-H[1].
H[i+1]=2*(H[i]+1)-H[i-1]
Posted by Alexey 27 Jun 2006 19:29