Help me with this question i am not able to solve
See this codechef tutorial: http://www.codechef.com/wiki/tutorial-lcs-problem-revisited