Diferente pentru problema/abp intre reviziile #1 si #6

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="abp") ==
Poveste şi cerinţă...
You are given an array $a$ of length $n$. You need to process $q$ queries. Each query is one of the following two types:
 
$1.$ $x$ - What is the value of $a[x]$ modulo $10^9+7$?
 
$2.$ $x, y, b, c$ - For every $i$ in the range $[x,y]$ $a[i]$ becomes max(a[i], $b*i^c$)
h2. Date de intrare
Fişierul de intrare $abp.in$ ...
The first line of the input file $abp.in$ contains the integer $n$, the length of the array.
 
The second line of the input contains $n$ integers, the $i$-th being $a[i]$
 
The third line of the input contains an integer $q$, the number of queries.
 
Each of the following $q$ lines contains a query of one of two aforementioned types.
h2. Date de ieşire
În fişierul de ieşire $abp.out$ ...
The output file $abp.out$ will contain the answers to queries of type $1$ on the order they appear in the input.
h2. Restricţii
* $... ≤ ... ≤ ...$
* $1 ≤ x, y ≤ n ≤ 10^5$
* $1 ≤ q ≤ 2 * 10^5$
* $1 ≤ a[i], b, c ≤ 10^5$
* The scores obtained now may be different compared to the ones from the original contest
h2. Exemplu
table(example). |_. abp.in |_. abp.out |
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
| 10
5 3 7 8 3 9 10 10 1 2
15
1 7
2 1 5 3 3
1 5
1 4
1 1
2 6 10 2 2
1 6
1 7
1 10
2 1 10 10 10
1 1
1 2
1 10
1 7
1 3
|10
375
192
5
72
98
200
10
10240
999999307
824752476
590490
|
h3. Explicaţie

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.