Problem7834--[yosupo]Associative Array

7834: [yosupo]Associative Array

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

You are given an array $a$ with infinite length. Initially, all elements are $0$. Process the following $Q$ queries in order.
  • 0 k v: a[k]←v
  • 1 k: Print a[k]

Input

$Q$
Query$_0$
Query$_1$
$:$
Query$_Q−1$

Output

Q line, print the answer.

Constraints

$1≤Q≤10^6$
$0≤k,v≤10^{18}$

Sample 1 Input

8
0 1 2
1 1
1 2
0 2 3
1 1
1 2
0 2 1
1 2

Sample 1 Output

2
0
2
3
1

HINT

相同题目:associative_array

Source/Category