#t72. 输出数组元素
输出数组元素
Output Array Elements
Problem Description
Input the number of elements n (1 ≤ n ≤ 100) of an array, together with the position and the value assigned to each element, and output the elements from position 1 to n in order, separated by a single space.
Note that the same position may be assigned multiple times; the last assignment takes effect as the final value of that position.
Input Format
The first line contains a positive integer n.
The following n lines each contain two positive integers x, v, meaning that position x of the array is assigned the value v.
Output Format
Output the elements from position 1 to n in order, separated by a single space.
Elements that were never assigned output 0.
Sample Input 1
3
1 3
1 2
2 4
Sample Output 1
2 4 0
Sample Input 2
5
5 1
3 1
2 2
4 8
1 9
Sample Output 2
9 2 1 8 1