#P9989. [Ynoi Easy Round 2023] TEST_69
[Ynoi Easy Round 2023] TEST_69
Problem Description
Given a sequence of length , there are operations.
Each time, there are two types of operations:
1 l r x: For all in the interval , set to .
2 l r: Query the sum of the interval , and output the answer modulo .
Input Format
The first line contains two integers .
The second line contains integers representing .
Then follow lines, each containing three or four integers, describing one operation.
Output Format
For each operation of type , output one line with one integer representing the answer to this query.
10 10
4 1 5 10 1 3 8 2 8 2
2 1 7
2 1 10
1 7 10 4
1 5 8 10
2 1 8
1 3 5 2
1 3 4 3
2 5 8
2 3 7
2 6 10
32
44
26
6
6
11
Hint
Idea: nzhtl1477, Solution: nhtl1477, Code: ccz181078, Data: ccz181078.
For of the testdata, .
For of the testdata, , and the elements in and the in each operation are generated randomly.
For another of the testdata, all queries happen after modifications.
For of the testdata, , , and all values are integers in .
Translated by ChatGPT 5