• [1317] Exercise of Sort

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Wodex opened the door successfully.
    At the same time, horn sounded:
    If you are not clever, the game will be so boring, next level will be more difficult. Ha-ha-ha...

    So, Wodex came in with his partners.
    At this room, there was a ciphertext on the wall.
    The words means:
    There are N lines, each line has two integers i and x, it means value x will be put on ith position. Every x is different.

    How to form the sequence of these values?

  • 输入
  • Input until EOF.
    First line will contain an integer N (1 <= N <= 200,000), then N lines follow, each line has two integers i (0 <= i < N) and x (0 <= x <= 1,000,000).
  • 输出
  • Output the final sequence of these numbers.
  • 样例输入
  • 4
    0 77
    1 51
    1 33
    2 69
    4
    0 20523
    1 19243
    1 3890
    0 31492
  • 样例输出
  • 77 33 69 51
    31492 20523 3890 19243
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜