25 teams scored 500 points on this task, for a maximum score of 20, an average score of 20 and a median score of 20.
Luca has an array a of length N. Luca need to process Q queries. Each query is one of two types: (1) 1 x arrow what is the value of a_x modulo 10^9 + 7? (2) 2 x, y, b, c arrow for every i in the range [x, y], a_i becomes \max(a_i, b * i^c). Help Luca find the answer to each type 1 query!