Problem: An undirected graph is given. Each edge of the graph disappears with a constant probability. Calculate the probability with which the remained graph is connected.



Input

The first line contains three integers N (1 \leq N \leq 14), M (0 \leq M \leq 100) and P (0 \leq P \leq 100), separated by a single space. N is the number of the vertices and M is the number of the edges. P is the probability represented by a percentage.

The following M lines describe the edges. Each line contains two integers v_i and u_i (1 \leq u_i, v_i \leq N). (u_i, v_i) indicates the edge that connects the two vertices u_i and v_i.

Output

Output a line containing the probability with which the remained graph is connected. Your program may output an arbitrary number of digits after the decimal point. However, the absolute error should be 10^{-9} or less.

Examples

Input

3 3 50
1 2
2 3
3 1


Output

0.500000000000


Input

3 3 10
1 2
2 3
3 1


Output

0.972000000000


Input

4 5 50
1 2
2 3
3 4
4 1
1 3


Output

0.437500000000

Solution (in CPP):

Solution:
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++)
#define EQ(a,b) (abs((a)-(b))<eps)
int N,M,Pe;
double p;
vector<P> edges;
int num[1<<15];
double dp[1<<15];
double pow(int x)
{
    double res = 1.0;
    double r = p;
    while(x)
    {
        if(x&1)res*=r;
        r=r*r;
        x>>=1;
    }
    return res;
}
double rec(int S)
{
    if(dp[S]!=-1.0)return dp[S];
    if(S==0)return 0.0;
    double ret = 1.0;
    vector<int> v;
    for(int i=0;i<N;i++)if(S&(1<<i))v.pb(i);
    int sz = v.size();
    for(int i=1;i<(1<<sz);i++)
    {
        int T = S;
        for(int j=0;j<sz;j++)if(i&(1<<j))T-=(1<<v[j]);
        if(!(T&1))continue;
        ret -= rec(T)*pow((num[T]+num[S-T]-num[(1<<N)-1-S])/2);
        //if(S==(1<<N)-1)cout << T << endl;
    }
    return dp[S]=ret;
}
int main()
{
    scanf("%d %d %d",&N,&M,&Pe);
    for(int i=0;i<M;i++)
    {
        int u,v;
        scanf("%d %d",&u,&v);
        u--;v--;
        edges.pb(P(u,v));
    }
    for(int i=0;i<(1<<N);i++)
    {
        for(int j=0;j<M;j++)
        {
            int u = edges[j].fi;
            int v = edges[j].sec;
            if(i&(1<<u) && !(i&(1<<v)))num[i]++;
            if(i&(1<<v) && !(i&(1<<u)))num[i]++;
        }
    }
    p = Pe/100.0;
    for(int i=0;i<(1<<N);i++)dp[i]=-1.0;
    //for(int i=1;i<(1<<N);i++)printf("%.12f\n",rec(i));
    printf("%.12f\n",rec((1<<N)-1));
    return 0;
}