Help needed to optimise the solution for Heaters (1066B)

Revision en1, by rohit_1402, 2020-04-28 22:34:05

[submission:78417751]I have formed the recursive solution for the problem Heaters https://codeforces.com/contest/1066/problem/B. In order to optimise the solution I am trying to use memoization approach but stuck in defining the state for dp.

My solution — https://codeforces.com/contest/1066/submission/78417751

Thanks in advance!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rohit_1402 2020-04-28 22:34:05 402 Initial revision (published)