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 "iostream"
#include "cstring"
#include "cstdio"
#include "vector"
#define PB push_back
#define MP make_pair
using namespace std;
double p, q;
const int N = 15;
double dp[N][1 << N];
int vis[N][1 << N];
double g[N][1 << N];
int v[1 << N];
double getdp(int x, int y);
double gao(int x)
{
	if(__builtin_popcount(x) == 0) return 1.0;
	int s = __builtin_ffs(x) - 1;
	return getdp(s, x ^ (1 << s));
}
double qpow(double x, int y)
{
	double ans = 1.0;
	while(y != 0){
		if(y & 1) ans = ans * x;
		x = x * x;
		y >>= 1;
	}
	return ans;
}
double getdp(int x, int state)
{
	if(vis[x][state]) return dp[x][state];
	vis[x][state] = 1;
	if(state == 0) return dp[x][state] = 1.0;
	int f = __builtin_ffs(state) - 1;
	int s = state ^ (1 << f);
	double sum = 0.0;
	for(int i = s; ; i = (i - 1) & s){
		int tmp = i ^ (1 << f);
		sum += getdp(x, tmp ^ state) * gao(tmp) * g[x][tmp] * qpow(q, v[state] - v[tmp] - v[state ^ tmp]);
		if(i == 0) break;
	}
	return dp[x][state] = sum;
}
vector<int> edge[N];

int main(void)
{
	int n, m, val;
	scanf("%d %d %d", &n, &m, &val);
	q = (double)val / 100.0;
	p = 1.0 - q;
	int x, y;
	for(int i = 1; i <= m; ++ i){
		scanf("%d %d", &x, &y);
		x --;
		y --;
		edge[x].PB(y);
		edge[y].PB(x);
	}
	for(int i = 1; i < (1 << n); ++ i){
		int k = __builtin_ffs(i) - 1;
		v[i] = v[i ^ (1 << k)];
		for(int j = 0; j < edge[k].size(); ++ j){
			int u = edge[k][j];
			if(i & (1 << u)){
				v[i] ++;
			}
		}
		for(int j = 0; j < n; ++ j){	
			if(i & (1 << j)) continue;
			int sum = 0;
			for(int k = 0; k < edge[j].size(); ++ k){
				int u = edge[j][k];
				if(i & (1 << u)){
					sum ++;
				}
			}
			g[j][i] = 1.0 - qpow(q, sum);
		}
	}
	printf("%.12f\n", gao((1 << n) - 1));
	return 0;
}