I am unable to find some idea to solve problem http://www.spoj.com/problems/CNTTREE/. I think that this is a dp problem. But no idea how can I find it’s states of dp. Could anybody help me with just the state part??
This problem is a little bit difficult. I will try this questions.
I Think This will Help U. It’s Clearly Explained Here LINK
@rakeshbubli143 : Thanks friend.
@s1m1_13 is this the answer you were looking for? I do not think so. And if you agree with me why would you check it as a correct answer?
Moreover @rakeshbubli143 has given appropriate answer and his answer is downvoted. This is not happening
We Must Leave the Questions like these to their common sense