4th Balkan Olympiad in Informatics
Nicosia, Cyprus, 19-25 October 1997


Day 2 - Problem 2 (Satellite configuration)



We want to launch a set of satellites in the sky in orbit around earth. Two satellites may transmit data to each other in a direct way, or in indirect way (i.e. via one or more intermediate satellites), or finally may have no connection at all. We say that two satellites are neighbors if they can send data to each other in a direct way.

Given a number n of satellites and a set of n integers, find out:
  1. if there exists a configuration of n satellites such that the given set of n integers correspond to the neighbors of the satellites
  2. if the answer in part (a) is positive, then describe such a setting,
  3. given the setting of part (b), conclude if we can send data from any satellite to any other one.






Time Limit : 20
Maximum Score : 35