Coup#4324

Coup

2 Sekunden
64 Megabyte
Sehr leicht

You are given an array and need to handle two types of queries:

Eingabe

The first line of the input contains two integers, and (1 \le n, m \le 10^5). The second line contains integers a_i (1 \le a_i \le 10^9), representing the initial array. The following lines each contain a query in the specified format. For the integers and , the constraint (1 \le L, R \le n) holds.

Ausgabe

For each query of type 2, print the result on a new line.

Beispiele

Beispiel 1

Loading
Loading