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 1108. Heritage

Edric Mao why greedy is right? [4] // Problem 1108. Heritage 24 Aug 2010 16:06
why taking the biggiest fraction of remain assure that the church gets the minimized?
Frontone Re: why greedy is right? [1] // Problem 1108. Heritage 15 Jul 2011 18:41
Please, anybody explain! Im also interested in answer!
zxc master Re: why greedy is right? // Problem 1108. Heritage 27 Dec 2020 11:43
RUS
можно разобрать на первом примере.
1/2, 1/3
1 - (1/2) - (1/3) = (1/6)
Пусть следующий элемент в массиве будут равен x. Тогда доля для церкви будет составлять (1/6)- x .  Пусть оно будет равно y
Следует:
x + y = (1/6)
Тогда для минимизации y, нужно максимизировать x.
wangbicheng1 Re: why greedy is right? [1] // Problem 1108. Heritage 19 Sep 2011 11:33
Also wondering... anyone can prove it?