How far away ? Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Submission(s): Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like…