SPOJ CNTTREE

Hi everyone,
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??

1 Like

This problem is a little bit difficult. I will try this questions.

1 Like

I Think This will Help U. It’s Clearly Explained Here :slight_smile: LINK

5 Likes

@rakeshbubli143 : Thanks friend.

1 Like

@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 :frowning:

2 Likes

We Must Leave the Questions like these to their common sense :slight_smile: :smiley:

i agree with @argonaut…srsly this is not done…@rakeshbubli143 had given a more appropriate ans…!!!

@rakeshbubli143 had sent this explaination link &
this is my AC code.

2 Likes
//