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;
using Int = long long;
signed main(){
  int n,m,p;
  cin>>n>>m>>p;
  double dp2[101];
  dp2[0]=1.0;
  for(int i=1;i<101;i++) dp2[i]=dp2[i-1]*(p/100.0);
  int e[15][15]={};
  for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    a--;b--;
    e[a][b]++;
    e[b][a]++;
  }
  double dp[1<<15]={};
  int look[1<<15]={};
  for(int i=0;i<(1<<n);i++){
    look[i]=0;
    for(int j=0;j<n;j++){
      for(int k=0;k<j;k++){
	if((i>>j)&1 && (i>>k)&1){
	  //look[i]*=1.0-get(e[j][k]);
	  look[i]+=e[j][k];
	}
      }
    }
    //look[i]=1.0-look[i];
    //cout<<i<<":"<<look[i]<<endl;
  }
  int used[1<<15]={};
  function<double(int)> dfs=[&](int b){
    //cout<<b<<" "<<used[b]<<" "<<dp[b]<<endl;
    if(used[b]) return dp[b];
    used[b]=1;
    if(b==0) return 0.0;
    double res=1;
    //double res=look[b];
    for(int i=b;i>0;i=(i-1)&b){
      if((i^b)&1){
	//cout<<(i^b)<<":"<<dfs(i^b)*look[i^b]<<endl;
	res-=dfs(i^b)*dp2[look[b]-(look[i]+look[i^b])];
      }
    }
    //cout<<b<<" "<<res<<endl;
    return dp[b]=res;
  };
  cout<<fixed<<setprecision(12)<<dfs((1<<n)-1)<<endl;
  return 0;
}