|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||0||0||0||0.000%|
The city you live in just finished construction of its new transport network, PlusRail. There are n stations and exactly one way to get between any given pair of them; this is because there are only n − 1 direct station:station connections. In other words, the network forms a tree.
You have been hired to put together the signage for each of the stations which shows where on the network a passenger is with a big arrow pointing to the bright red station in the centre.
Figure G.1: Illustration of Sample Input 1 and how two designs are reused four times, with the labels painted at different places.
Because the drawings of the network are fairly crude, it is actually possible that you could use the same sign in more than one station, and just write a different permutation of labels for the station names.
If you want to make signage for the whole network, what is the minimum number of unique designs you will need?
Output the minimum number of map designs that can be made, such that for any station at least one of these map designs can be re-labelled such that this station is in the centre.
4 1 2 2 3 3 4
11 1 2 2 3 3 4 4 5 4 6 4 7 5 10 10 9 10 8 7 11
7 7 1 7 2 3 2 7 4 5 4 6 5