dp problem what makes the difference between the two?

Revision en2, by Vesper_Lynd, 2018-08-16 21:48:20

Submission 1 in this code my solution accepts if i inititiate dp with -1; Submission 2 in this code my solution exceeds if i inititiate with dp=0 what makes the difference between the 2? i know if d>n dp=0 but i have covered that solution already so what further cases it counts uselessly,please help!! Problem Source

Tags #dynamic-programming

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Vesper_Lynd 2018-08-16 21:48:20 29
en1 English Vesper_Lynd 2018-08-16 21:47:05 510 Initial revision (published)