Closed ishwari20 closed 3 years ago
Hello @ishwari20,
Thank you for opening an issue. :partying_face:
To get assigned to this particular issue please use /assign
Check this guide before contributing.
/assign
This issue has been assigned to @ishwari20! It will become unassigned if it isn't closed within 12 days. A maintainer can also add the pinned label to prevent it from being unassigned.
π₯ Proposal
Ninja decided to find the distance between the neighbouring cities and then store them for future use. He took data from the map and developed an input format. He is given an integer βNβ denoting the number of cities and then he has an array of size βN - 1β that stores a pair of numbers at each index. Let the pair be βI1β and βI2β, which will denote a bidirectional edge between the two cities βI1β and βI2β. A subtree is a subset of cities, where each city can be reached from every other city of the subset. The path between each pair passes only though the cities present in the subset. Two subtrees are taken differently if there are one or more cities in one subtree not present in the other. Now, you need to create an array of βN - 1β elements where the βithβ element is the number of subtrees in which the maximum distance between any two cities is equal to βiβ.
Have you read the Contributing Guidelines on Pull Requests?
Yes