$ 0 0 PROBLEM LINK:PracticeContestAuthor:Priyanshu JainDIFFICULTY:MEDIUMPREREQUISITES:DP, Math etc.AUTHOR'S AND TESTER'S SOLUTIONS:Author's solution can be found here.