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

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

Hi, 830A - Ключи от офиса

In the above problem,the author has given a greedy solution to the problem,It was not really intuitive.. I saw some one discussing in the editorial that this problem infact can be solved with a very general DP solution.. It looks and feels like a well known DP problem,Can someone help me in solving this problem in DP way..I tried finding DP solution in submissions but was not able to..

EDIT: found one DPish solution but it does not make sense to me..28513159

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

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

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

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

Sorry for the previous comment.

We need find numbers x such that

We can simulate this by repeatedly taking intersection using a set.

Take a look at my solution