Change on the Segment Junior#2876

Change on the Segment Junior

1 segundo
8 megabytes
Fácil

You are given a set of integers a_0, a_1, \ldots, a_{N-1}, all initially equal to . Then, a sequence of modification and output requests is provided.

For a modification request, three integers , , and are given. For this request, add to each element a_i where l \leq i \leq r.

For an output request, a single integer is given. For this request, print the current value of a_i.

Entrada

The first line contains three integers , , and , which are the number of elements, the number of modification requests, and the number of output requests, respectively.

The following MA + MQ lines describe the requests. A modification request is given as A, , , , and an output request as Q, .

All numbers are integers. 1 \leq N \leq 10^6, 0 \leq MA, MQ \leq 10^6, 0 \leq l \leq r < N, 0 \leq i < N, |d| \leq 10^3. At least one among , , or does not exceed .

Salida

For each output request, print the current value of the specified element on a separate line.

Ejemplos

Ejemplo 1

Loading
Loading