Forgotten attractions (coordonate)

39 teams scored 635 points on this task, for a maximum score of 40, an average score of 16 and a median score of 15.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (55).
  2. Lombardia is the region with the most points (180).

Statement

During his algorithmic excursions in the Alps, Giorgio likes to stop from time to time and visit some attractions. An attraction can be any place: an old abandoned church, a safe house or just a remarkable place from which to watch the stunning landscape. He has marked on the map N of these attractions, each situated at a different altitude of A[i] meters above sea level. The night before the excursion, Luca wanted to pull a prank on Giorgio and erased all the altitudes from the map. Instead, he left a footnote with a list of (N * (N-1))/2 numbers where each value is the positive altitude difference between two attractions (reported only once, i.e. for each pair of different attractions (i, j) only the difference |A[i] - A[j]| is listed). Giorgio has just woken up and found the prank: knowing that among the attractions he also listed his house (located at an altitude of zero meters), help him saving his excursion by reconstructing all the altitudes of the attractions!