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<bits/stdc++.h>
using namespace std;
int V,E;
double P,Q;
vector<int> G[15];


void printbit(int S){
  for(int i=0;i<V;i++){
    cout<<(S>>i&1)<<' ';
  }
  cout<<endl;
}

double func(int S,int U){

  double res=1;
  for(int i=0;i<V;i++){
    if(S>>i&1){
      for(int j=0;j<(int)G[i].size();j++){
        int w=G[i][j];
        if(S>>w&1)continue;
        if(U>>w&1)        res*=P;
      }
    }
  }



  return res;
}

double dp[(1<<14)];

double rec(int S){

  if(dp[S]!=-1)return dp[S];
  if(S==1)return 1.0;

  double res=0;
  int sup=S;
  int sub=sup;
 

  do{
    if(sub&1){
      if(sub!=S){
        double A=rec(sub);
        double B=func(sub,S);
        res+=A*B;
      }
    }
    sub=(sub-1)&sup;
  }while(sub!=sup);

  res=1.0-res;

  return dp[S]=res;
}

void init(){
  for(int i=0;i<15;i++)G[i].clear();
  for(int i=0;i<(1<<14);i++){
    dp[i]=-1;
  }
}


bool check(){
  bool visited[15]={};
  visited[0]=true;
  queue<int> que;
  que.push(0);

  while(!que.empty()){
    int pos=que.front();que.pop();
    for(int i=0;i<(int)G[pos].size();i++){
      int w=G[pos][i];
      if(visited[w])continue;
      visited[w]=true;
      que.push(w);
    }
  }

  for(int i=0;i<V;i++)
    if(!visited[i])return false;

  return true;
}

int main(){
  while(cin>>V>>E>>P){
    init();
    P/=100.0;
    Q=1.0-P;
    for(int i=0;i<E;i++){
      int a,b;
      cin>>a>>b;
      a--;b--;
      G[a].push_back(b);
      G[b].push_back(a);
    }

    if(!check()){
      printf("0.0\n");
      continue;
    }
    printf("%.10f\n",rec((1<<V)-1));
  }
  return 0;
}