Can you help me in this ?? I am getting TLE in my submission for this problem !

Revision en1, by CrypticTaiga, 2020-07-24 22:45:56

Problem — Nastya and Scoreboard

My submission — Cryptic Taiga's Submission

I figured out a way to solve this problem. First I saved the number of changes needed to be made in each input string/digit to a digit from 0-9 in the array changes[][]. Next, I filled up the dp[][][] array with 0, 1 depending upon if this path leads to the maximum obtainable number as per the requirement of the question.

But, somehow i am getting TLE in the testcase 7.

Please help solving and correcting my submission.

Tags #3d-dp, #java, #optimization, #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English CrypticTaiga 2020-07-24 22:45:56 708 Initial revision (published)