#P1483. 序列变换
序列变换
Description
Given a sequence of integers , you need to perform the following operations:
- Input format
1 x y, which means add to all (where is a positive integer and ). - Input format
2 j, which means output .
Specifically, for operation 2, when , output .
Input Format
The first line contains two integers , meaning there are numbers and operations.
The second line contains integers .
Then follow lines, each describing one of the operations.
Output Format
Output several lines, each corresponding to one operation 2.
5 4
6 9 9 8 1
2 4
1 2 5
1 3 1
2 4
8
13
Hint
For of the testdata, .
For of the testdata, , , , , , , and the number of operation 2 is at most .
Translated by ChatGPT 5
京公网安备 11011102002149号