Please Help with dp problem?

Revision en1, by BanazadehAria, 2019-07-01 14:06:49

Hi can anyone tell any dp approach to this?

Problem link==> http://mirror.codeforces.com/contest/1151/problem/B

I can think of a O(n*m*2^10) But it will not pass.

Thanks in advance.

Tags #help, #dynamic programming, #tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English BanazadehAria 2019-07-01 14:11:17 3 Tiny change: 'n*m*2^10) But it wi' -> 'n*m*2^10) dp But it wi'
en1 English BanazadehAria 2019-07-01 14:06:49 212 Initial revision (published)