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 <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#define bitcount __builtin_popcount
#define bitctz __builtin_ctz
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n, m; double p;
	cin>>n>>m>>p; p/=100;
	int a[100], b[100];
	for(int i=0; i<m; i++){
		cin>>a[i]>>b[i]; a[i]--; b[i]--;
	}
	int ct[1<<14]={};
	for(int i=0; i<(1<<n); i++){
		for(int j=0; j<m; j++){
			if((i&(1<<a[j])) && (i&(1<<b[j]))) ct[i]++;
		}
	}
	double dp[15][1<<14]={};
	for(int i=0; i<n; i++) dp[1][1<<i]=1;
	for(int i=1; i<(1<<n); i++){
		if(bitcount(i)==1) continue;
		int t=bitctz(i);
		for(int j=i; j>0; j=(j-1)&i){
			if((j&(1<<t))==0) continue;
			if(j==i) continue;
			for(int k=1; k<n; k++){
				dp[k+1][i]+=(dp[k][i-j]*dp[1][j]*pow(p, (double)(ct[i]-ct[j]-ct[i-j])));
			}
		}
		dp[1][i]=1;
		for(int k=2; k<=n; k++){
			dp[1][i]-=dp[k][i];
		}
	}
	printf("%.10lf\n", dp[1][(1<<n)-1]);
	return 0;
}