| UTPC Spring 2026 Open Contest |
|---|
| Finished |
The curators of planet Fontaineblue are obsessed with Earth's classical period. They "borrowed" masterpieces and ran them through a 3D-quantum replicator to sell perfect pairs to wealthy collectors. However, a power surge during the process caused the machine to skip exactly two unique originals. Now, the vault contains paintings, but the curators have lost track of which two items still need their twin. Help find them!
The first line contains a single integer $$$N$$$ ($$$2 \le N \le 10^6$$$) — the number of unique masterpieces originally borrowed.
The $$$i$$$-th line after that, for $$$2N - 2$$$ lines, contains $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$), representing an ID of a painting currently present in the vault.
Note the memory limit!
Print two space-separated integers in ascending order: the IDs of the two masterpieces that are missing their duplicates.
37137
1 3
| Name |
|---|


