Changing on a Segment (High)#2875

Changing on a Segment (High)

1 sekunda
128 megabajtov
Zelo lahko

You are given an array of integers a_0, a_1, \dots, a_{n-1}. Initially, all elements are equal to .

Then, you are given queries. Each query is one of the following two types:

Vhod

The first line contains two integers and (1 \le n \le 10^6, 0 \le m \le 10^6) — the number of elements and the number of queries.

Each of the next lines contains a query in one of the formats described above. All numbers are integers.

Izhod

For each print query, output the current value of the corresponding element on a separate line.

Primeri

Primer 1

Loading
Loading