CSES DP SECTION — Book Shop

Revision en3, by AC_AC, 2020-12-30 07:10:17

I was solving Book Shop of CSES DP section.

  • I am getting TLE even after multiple attempts, Can you tell me how to optimize my TOP-DOWN approach.
  • I have tried replacing 2-d array with 2-d vector .
  • I have also tried swapping the dimensions of dp array ( some caching thing ).
my code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English AC_AC 2020-12-30 07:10:17 2
en2 English AC_AC 2020-12-30 07:09:24 93
en1 English AC_AC 2020-12-30 07:00:57 991 Initial revision (published)