A forest contains T trees numbered from 1 to T and P people
A forest contains T trees numbered from 1 to T and P people numbered from 1 to P.Standard input consists of a line containing P and T followed by several lines,containing a pair of integers i and j,indicating that person i has heard tree j fall.People may have different opinions as to which trees,according to Berkeley,have made a sound.
Input contains multiple test cases.Subsequent test cases are separated with a single blank line.
什么
意思