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

Question : “Problem - E1 - Codeforces
My solution : “Submission #89107112 - Codeforces

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 .
Graphs Problems - Codeforces
Algorithm Gym :: Graph Algorithms - Codeforces

2 Likes

It’s great actually

1 Like

Thanks :slight_smile: