题目来源:http://noi.openjudge.cn/ch0406/2384/
2384: Cell Phone Network
总时间限制: 10000ms 单个测试点时间限制: 1000ms 内存限制: 65536kB
描述
Farmer John has decided to give each of his cows a cell phone inhopes to encourage their social interaction. This, however, requires him to setup cell phone towers on his N (1 <= N <= 10,000) pastures (convenientlynumbered 1..N) so they can all communicate.
Exactly N-1 pairs of pastures are adjacent, and for any two pastures A and B (1<= A <= N; 1 <= B <= N; A != B) there is a sequence of adjacentpastures such that A is the first pasture in the sequence and B is the last.Farmer John can only place cell phone towers in the pastures, and each towerhas enough range to provide service to the pasture it is on and all pasturesadjacent to the pasture with the cell tower.
Help him determine the minimum number of towers he must install to provide cellphone service to each pasture.
输入
* Line 1: A single integer: N
* Line