PAT 1004 数叶子
1004 Counting Leaves A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. 一个家庭的层级结构通常用家谱树来表示。你的任务是统计那些没有孩子的家庭成员。 输入格式: Each input file contains one test case. Each case starts with a line containing 0<N<100, the number of nodes in a tree, and M (<N), the number of non-leaf nodes. Then M lines follow, each in the format: ID K ID[1] ID[2] ... ID[K] where ID is a two-digit number representing a given non-leaf node, K is t....