Блог пользователя determinism

Автор determinism, история, 11 лет назад, По-английски

I couldn't prove the greedy algorithm which is used in the A part of this problem, so I looked it up on the internet and found this. There is a proof there, but I think that it's incomplete. Specifically, it doesn't prove subproblem needs to be solved optimally for problem to be solved optimally. Thanks for help in advance.

Also, I'm really bad at greedy algorithms. Is there any text on proof techniques for greedy algorithms, must-solve problems, or other important stuff on greedy algorithms you know?

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by determinism (previous revision, new revision, compare).

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

One tip: use binary search when possible, so you can be sure that the solution is correct. For example, in this problem you can binary search for the ending time of A and B.