atcoder#ABC256H. [ABC256Ex] I like Query Problem
[ABC256Ex] I like Query Problem
Score : points
Problem Statement
You are given , , and . Process queries described below. Each query is of one of the following three kinds:
1 L R x
: for , update the value of to $\displaystyle \left\lfloor \frac{a_i}{x} \right\rfloor$.2 L R y
: for , update the value of to .3 L R
: print .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format, where denotes the -th query to be processed:
Each query is given in one of the following three formats:
Output
Print the answer to the queries as specified in the Problem Statement, with newlines in between.
3 5
2 5 6
3 1 3
1 2 3 2
3 1 2
2 1 2 3
3 1 3
13
4
9
Initially, . Thus, the answer to the -st query is . When the -nd query has been processed, . Thus, the answer to the -rd query is . When the -th query has been processed, . Thus, the answer to the -th query is .
6 11
10 3 5 20 6 7
3 1 6
1 2 4 3
3 1 3
2 1 4 10
3 3 6
1 3 6 2
2 1 4 5
3 1 6
2 1 3 100
1 2 5 6
3 1 4
51
12
33
26
132