Codeforces Round 661 (Div. 3), problem: (E1) Weights Division (easy version)

Question : “
My solution : “

I simplify and write clean commented code, I think it will be helpful so I shared here.

Thanks, @galencolin ( after reading your code and dry run on paper, I finally understand where my previous code goes wrong )

@ssrivastava990, during contest i was not able even to approach the problem as i just know the basics of tree and graph, what else to know is required to solve this problem or this kind of similar problems?

practice all u need .


It’s great actually

1 Like

Thanks :slight_smile: