Change on the Segment Junior
You are given a set of integers: , , ..., , all initially set to . You will receive a series of modification and output requests.
For a modification request, you will be provided with three integers: , , and . You need to add the value to each element where .
For an output request, you will be given a single integer . You need to output the current value of the element .
Input Format
The first line contains three integers: , , and . These represent the number of elements, the number of modification requests, and the number of output requests, respectively.
The following lines contain the requests. Each modification request is formatted as ", , , ", and each output request is formatted as ", ".
All numbers are integers with the following constraints: , , , , and . It is guaranteed that at least one of the numbers , , or will not exceed .
Output Format
For each output request, print the current value of the specified element on a new line.