Independent Events

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Yuuka is interested in nn independent events. The probability that the ii-th event occurs is p_ip\_i. Yuuka is going to perform mm operations, each being one of the following:

  • "0 l_il\_i r_ir\_i": considering only the events from l_il\_i to r_ir\_i (both inclusive), find the probability that none of these events occur. As the value may be too small, you need to print the natural logarithm of the probability: if the probability is pp, print ln(p)\ln(p).
  • "1 l_il\_i r_ir\_i k_ik\_i": for all l_ijr_il\_i \le j \le r\_i, multiply p_jp\_j by k_ik\_i. All events remain independent.

입력

The input contains zero or more test cases, and is terminated by end-of-file. For each test case:

The first line contains two integers nn and mm: the number of events and the number of operations (1n,m1051 \le n, m \le 10^5).

The second line contains nn real numbers p_1,p_2,,p_np\_1, p\_2, \dots, p\_n where p_ip\_i is the probability that the ii-th event occurs (105p_i0.110^{-5} \le p\_i \le 0.1).

The following mm lines provide the descriptions of the operations. The ii-th line starts with an integer t_it\_i: the type of the corresponding operation. If t_it\_i is "0", it is followed by two integers l_il\_i and r_ir\_i. If t_it\_i is "1", it is followed by two integers l_il\_i and r_ir\_i, and a real number k_ik\_i (1l_ir_in1 \le l\_i \le r\_i \le n, 0.0001k_i1000.0001 \le k\_i \le 100).

Each real number in the input has exactly five digits after the decimal point. Additionally, it is guaranteed that, at every moment, every p_ip\_i lies in the interval \[105,0.1]\[10^{-5}, 0.1].

It is guaranteed that neither the sum of all nn nor the sum of all mm will exceed 10510^5.

출력

For each operation of type "0", output a real number denoting the answer. Your answer will be considered correct if its relative error doesn't exceed 10910^{-9}.