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.