Submit solution
Points:
10 (partial)
Time limit:
1.0s
Java
1.5s
Python
2.0s
Memory limit:
256M
Author:
Problem type
Ever since Mr. DeMello forced you to clean the campus, he has been feeling remorseful, so he only asks you to maintain his new array.
Initially, he has
1 i j
: Update the element at index
2 L R
: Output the sum of every second element starting at
Constraints
For all subtasks:
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Input Specification
The first line will contain
The next line will contain
The next
Note: Fast I/O might be required to fully solve this problem (e.g., BufferedReader for Java).
Output Specification
For every type
Sample Input
Copy
5 5
1 5 6 9 3
2 1 5
2 2 5
1 2 -4
2 1 5
2 2 5
Sample Output
Copy
10
14
10
5
Comments