Organizing Party
시간 제한2초메모리 제한1024 MB
양쪽 크기가 다른 이분 acquaintance 그래프에서 최대 7번의 이웃 집합 질의만으로 차수가 1이 아닌 손님 한 명을 찾는다.
문제
Pak Dengklek is organizing a party at his place. This party is attended by guests, numbered to . The guests numbered to are male guests, while the guests numbered to are female guests.
Each guest gets acquainted with zero or more other guests that have the opposite gender. If the guest gets acquainted with guest , then guest also gets acquainted with guest . Since the duration of the party is quite short, usually each guest gets acquainted by exactly one other guest. A guest is said to be unusual if the guest does not get acquainted with other guests or gets acquainted with more than one other guests.
After checking the guest list, Pak Dengklek notices that the number of male guests is not the same as the number of female guests. Therefore, there must be at least one unusual guest. You want to help Pak Dengklek to identify any unusual guest.
You can ask at most questions to Pak Dengklek. For each question, you can ask a set of guests. Pak Dengklek will answer the set of guests that get acquainted with at least one guest in the set. In other words, if you ask a set of guests , then a guest will be in the set answered by Pak Dengklek if and only if there is a guest in the set and guest gets acquainted with guest .