How to use memoization in my recursion code?

Problem:
https://www.codechef.com/JAN21C/problems/WIPL

Code:
https://www.codechef.com/submit/WIPL

Hey, the link to the submission you have provided is actually the link to the general submit page of the problem.
Please provide the link to your specific solution that you are referring to so that we can help.