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<cmath>
#include<cstdlib>
#include<algorithm>
#include<iostream>
using namespace std;
int n,m,p;
int num[20000+10];
double dp[20000+10];
struct E
{
	int u,v;
}e[100+10];
double qpow(double d,int c)
{
	if(c==0)return 1;
	if(c==1)return d;
	double ret=qpow(d,c/2);
	ret=ret*ret;
	if(c&1)ret=ret*d;
	return ret;
}
int main()
{
	while(scanf("%d%d%d",&n,&m,&p)!=EOF)
	{
		memset(num,0,sizeof(num));
		memset(dp,0,sizeof(dp));
		for(int i=1;i<=m;i++)
		{
			scanf("%d%d",&e[i].u,&e[i].v);
		}
		for(int i=1;i<(1<<n);i++)
		{
			for(int j=1;j<=m;j++)
			{
				if(i&(1<<(e[j].u-1))&&i&(1<<(e[j].v-1)))num[i]++;
			}
		}
	//	for(int i=1;i<=n;i++)dp[1<<(i-1)]=1;
		for(int i=1;i<(1<<n);i++)
		{
			for(int j=i&(i-1);j;j=i&(j-1))
			{
				if(j&(i&(-i)))
				dp[i]+=(1-dp[j])*qpow(p*1.0/100,num[i]-num[j]-num[i&(~j)]);
			}
		}
		printf("%.12f\n",1-dp[(1<<n)-1]);
	}
	return 0;
}