Caves

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

문제

Sophie is a treasure seeker. Right now she's looking for a treasure hidden in a system of nn caves, which are numbered from 11 to nn. She knows that the cave system contains exactly one treasure in one of the caves. Sophie has done some measurements using a georadar; this has not told her where the treasure is, but she has obtained, for each cave, a probability that the treasure is in that cave.

Sophie will continue her search using a precise remote probe: after the probe enters a cave, it instantly finds out whether the cave contains the treasure. The probe starts its search in cave number 11, and it is known that this cave does not contain the treasure. Sophie knows (from her georadar measurements) which pairs of caves are connected using bidirectional tunnels which the probe can traverse. Such a traversal takes the probe one minute. Unfortunately, there is no guarantee that the probe can make its way from cave 11 to every other cave (even in many steps).

As an alternative to traversing the tunnels, Sophie can choose to abandon her probe and insert a new probe into the system, which takes tt minutes. If she does so, communication with the old probe is lost and Sophie can no longer use it. Under these field conditions, inserting a new probe is very imprecise: it lands with uniform 1n\frac 1n probability in any of the nn caves. Sophie instantly knows where the probe has landed. Sophie has infinitely many probes at her disposal.

Help Sophie to find the treasure fast. Find a program which reads the size of the cave system, a description of the tunnels, the time tt of introducing a new probe, as well as the probability distribution of where the treasure is, computes the smallest (over all Sophie's strategies) expected time of finding the treasure, and writes the computed value to standard output. By finding the treasure we mean reaching the treasure cell with a probe.

입력

The first line of input contains three space-separated integers n,m,tn,m,t (2n202 \leq n \leq 20, 0mn(n+1)20 \leq m \leq \frac{n(n+1)}{2}, 1t1001 \leq t \leq 100). They denote the number of caves, the number of tunnels and the time needed to insert a new probe. The second line contains nn space-separated real numbers p_1,p_2,,p_np\_1, p\_2, \ldots, p\_n (p_1=0p\_1=0, 0p_i10 \leq p\_i \leq 1, _i=1np_i=1\sum\_{i=1}^{n}p\_i=1); the number p_ip\_i is the probability that the treasure is in the ii-th cave. These values are given with two decimal digits of precision. The next mm lines describe the tunnels. The description of each tunnel consists of two space-separated integers i,ji,j (1i,jn1\leq i,j\leq n and iji\neq j), which denote a tunnel between caves ii and jj that the probe can traverse in either direction. You can assume that all tunnels are distinct.

출력

The first and only line of output should contain a real number --- the minimum possible expected time of finding the treasure.

The answer is considered correct if its absolute or relative error is at most 10610^{-6}.

힌트

In sample 1, Sophie should first move the probe to cave 22 and then to cave 33. With probability 12\frac 12 it has found the treasure in time 22. If it has not, she should now start inserting new probes, until one gets inserted into the cave 44. The expected number of insertions is 44, so the expected total time in this case is 4242. On average, it takes Sophie 2222 seconds to find the treasure. (Note that after 22 minutes, Sophie already knows where the treasure is, but she still needs to reach it with a probe.)