摘要:
You are given a rooted tree consisting of nn vertices numbered from 11 to nn . The root of the tree is a vertex number 11 . A tree is a connected undi 阅读全文
摘要:
题目描述 Farmer John 计划建造 NNN 个农场,用 N−1N-1N−1 条道路连接,构成一棵树(也就是说,所有农场之间都互相可以到达,并且没有环)。每个农场有一头奶牛,品种为更赛牛或荷斯坦牛之一。 Farmer John 的 MMM 个朋友经常前来拜访他。在朋友 iii 拜访之时,Far 阅读全文
摘要:
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文