#P10639. BZOJ4695 最假女选手
BZOJ4695 最假女选手
Problem Description
Given a sequence of length , you need to support the following operations:
- Add an integer to an interval .
- In an interval , change all numbers less than into .
- In an interval , change all numbers greater than into .
- Query the sum of an interval .
- Query the maximum value of an interval .
- Query the minimum value of an interval .
Input Format
The first line contains an integer , which is the length of the sequence.
The second line contains integers , which represent the initial sequence.
The third line contains an integer , which is the number of operations.
The next lines each contain three or four integers, representing one operation described above.
Output Format
For each operation of type , output one line with one integer representing the answer.
2
1 2
2
2 1 2 2
4 1 2
4
Hint
Constraints: , .
When performing operation , .
When performing operation , .
Translated by ChatGPT 5