$N$ frogs are attempting to prolong their life-span. They live in the bottom of a well which can be described as a two-dimensional $N×N$ grid. $Grid (i,j)$ is located in the $i-th$ row and the $j-th$ column. At the beginning, the $i-th$ frog lives in the bottom of $i-th$ column, i.e. the place below $grid (1,i)$.
The frogs are so devout that God decides to give them a chance. In each row $i$, a horizontal membrane ranging from $(i,L_i $) to $(i,R_i )$ inclusively is created. A capsule of elixir is placed at one of the grids of the membrane with uniform probability.
Now the frogs are jumping upwards to pursue immortality. The $i-th$ frog would be in $grid (j,i)$ after $j$ jumps. When a frog arrives at a grid that contains a capsule of elixir, it will eat the capsule and gain immortality. After that, it continues jumping upwards until it gets out of the well.
A membrane is considered “bad” if it convers less than $N$ grids. The frogs are very sensitive, so they can only endure passing through 10 bad membrane. When a frog reaches the $11^{th}$ bad membrane, it thinks that there is no hope to get out of the well, so it will go back to the bottom of well and live there until death, even though it has eaten a capsule of elixir already.
The frogs are friends, so they want all of them gain immortality and live a happy life out of the well. They want to know the probability $P$ that every frog eats exactly one capsule of elixir and gets out of the well.