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>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 15

int V,E;
int POW[NUM];
int num_edge[NUM][NUM];
double dp[16384];
double P,P_POW[101];

int main(){

	for(int i = 0; i < NUM; i++)POW[i] = pow(2,i);

	scanf("%d %d %lf",&V,&E,&P);

	P /= 100.0;

	P_POW[0] = 1.0;
	for(int i = 1; i <= 100; i++)P_POW[i] = P*P_POW[i-1];

	for(int i = 0; i < V; i++){
		for(int k = 0; k < V; k++)num_edge[i][k] = 0;
	}

	int from,to;
	for(int loop = 0; loop < E; loop++){
		scanf("%d %d",&from,&to);
		from--;
		to--;
		num_edge[from][to]++;
		num_edge[to][from]++;
	}

	int num_node,sub_state,num_del_edge,base_node;
	vector<int> G,sub_G;

	for(int state = 1; state < POW[V]; state++){
		num_node = 0;
		G.clear();

		dp[state] = 1.0;

		for(int loop = 0; loop < V; loop++){
			if(state & (1 << loop)){
				G.push_back(loop);
				base_node = loop;
				num_node++;
			}
		}
		if(num_node == 1){
			continue;
		}

		for(int i = 1; i < POW[num_node]-1; i++){

			sub_state = 0;
			sub_G.clear();

			for(int loop = 0; loop < num_node; loop++){
				if(i & (1 << loop)){
					sub_state += POW[G[loop]];
					sub_G.push_back(G[loop]);
				}
			}

			if((sub_state & (POW[base_node]))  == 0)continue;

			num_del_edge = 0;

			for(int k = 0; k < sub_G.size(); k++){
				for(int a = 0; a < G.size(); a++){
					if(POW[G[a]] & sub_state)continue;

					num_del_edge += num_edge[sub_G[k]][G[a]];
				}
			}
			dp[state] -= dp[sub_state]*P_POW[num_del_edge];
		}
	}

	printf("%.10lf\n",dp[POW[V]-1]);

	return 0;
}