1. 程式人生 > >POJ 2492 A Bug's Life (bug們被悲劇了)

POJ 2492 A Bug's Life (bug們被悲劇了)

Background
Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gender. In his exp eriment, individual bugs and their interactions were easy to identify, because numbers were printed on their backs.
Problem

Given a list of bug interactions, decide whether the experiment supports his assumption of two genders with no homosexual bugs or if it contains some bug interactions that falsify it.