• [B] Brave Sword

  • 时间限制: 600 ms 内存限制: 65535 K
  • 问题描述
  • When Wodex is running in his village to live down, He fainted by fumes. Fortunately, a mysterious man saved him...

    Ten years later, he learned some skills from the mysterious man and have knowed who was personal enemy, just named Zero. So, he embarked on a journey of revenge.
    But before it, the mysterious man wanted to test him.
    Problem comes. The mysterious man prapared a maze where hided a brave sword. To get it, Wodex came in the maze.

    There were many keys in the maze, each key had a number, only two keys can open the door to get brave sword. But there existed many keys' number were the same in pairs, if the number of keyA was the same as keyB, these two keys won't be the solution to the door. So, there would be left only last two different numbers of keys.

    Can you help Wodex to find out these two keys' number?

  • 输入
  • Input until EOF.
    First line will contain an even integer N (N < 1,000,000) means the number of whole keys.
    And next line will contain N un-negative integers. Each integer means the number of each key and will be less than 10000000.
  • 输出
  • What are they? Output the number of their keys from small to large.
  • 样例输入
  • 8
    1 1 2 2 2 3 3 4
    8
    1 1 2 2 3 3 4 5
  • 样例输出
  • 2 4
    4 5
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜