#P4148. 简单题
简单题
Description
You have an board with an integer in each cell, all initially . You need to support three types of operations:
1 x y A, and is a positive integer. Add to the number in cellx,y.2 x1 y1 x2 y2, . Output the sum of numbers inside the rectangle .3None. Terminate the program.
Input Format
The first line contains a positive integer .
Each of the following lines contains one operation. For every command, all numbers after the first one must be XORed with the previous output answer last_ans. Initially, last_ans .
Output Format
For each operation of type , output the corresponding answer.
4
1 2 3 3
2 1 1 3 3
1 1 1 1
2 1 1 0 7
3
3
5
Hint
Constraints: , the number of operations does not exceed , memory limit . It is guaranteed that answers fit in the range of int and that after decoding the testdata remains valid.
Translated by ChatGPT 5
京公网安备 11011102002149号