CF315B Sereja and Array
Description
Sereja has got an array, consisting of $ n $ integers, $ a_{1},a_{2},...,a_{n} $ . Sereja is an active boy, so he is now going to complete $ m $ operations. Each operation will have one of the three forms:
1. Make $ v_{i} $ -th array element equal to $ x_{i} $ . In other words, perform the assignment $ a_{vi}=x_{i} $ .
2. Increase each array element by $ y_{i} $ . In other words, perform $ n $ assignments $ a_{i}=a_{i}+y_{i} $ $ (1
Input Format
The first line contains integers $ n $ , $ m $ $ (1
Output Format
For each third type operation print value $ a_{qi} $ . Print the values in the order, in which the corresponding queries follow in the input.