Help with Spoj DP problem

Revision en1, by rahulkhairwar, 2016-06-21 10:36:34

I was trying this question and this is the solution I came up with, but it timed out as it doesn't use memoization.

But I'm not getting the idea about how to memoize this solution. And I can't even find any good explanation for the question anywhere. Can someone please help?

Thanks.

Tags spoj, dynamic programming, bitmasks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rahulkhairwar 2016-06-21 10:36:34 407 Initial revision (published)