#P6327. 区间加区间 sin 和
区间加区间 sin 和
Description
Given an integer sequence of length , perform operations. There are two types of operations.
Operation : given , add to each of .
Operation : given , query .
Input Format
The first line contains an integer .
The next line contains integers representing .
The next line contains an integer .
The next lines each describe an operation. Operation is written as 1 l r v, and operation is written as 2 l r.
Output Format
For each operation , output one line with the answer, rounded to one decimal place.
It is guaranteed that the absolute value of the answer is greater than , and that the second digit after the decimal point of the exact answer is not or .
5
1 3 1 5 5
5
1 5 5 5
2 3 3
2 1 5
2 2 2
2 4 4
0.8
0.3
0.1
-1.0
Hint
Idea: nzhtl1477, Solution: nzhtl1477, Code: ccz181078, Data: nzhtl1477.
Constraints: , . It is guaranteed that all input numbers are positive integers.
Translated by ChatGPT 5
京公网安备 11011102002149号