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 <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define llint long long
#define inf 1e18
#define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++)
#define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))

using namespace std;
typedef pair<llint, llint> P;

llint n, m;
double p;
vector<llint> G[20];
llint in[1<<14];
double dp[1<<14];

int main(void)
{
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	
	cin >> n >> m >> p;
	p /= 100;
	
	llint u, v;
	for(int i = 0; i < m; i++){
		cin >> u >> v;
		u--, v--;
		G[u].push_back(v);
		G[v].push_back(u);
	}
	
	llint N = 1<<n;
	for(int i = 0; i < N; i++){
		for(int j = 0; j < n; j++){
			if((i & (1<<j)) == 0) continue;
			for(int k = 0; k < G[j].size(); k++){
				if(i & (1<<G[j][k])) in[i]++;
			}
		}
		in[i] /= 2;
	}
	
	for(int i = 0; i < N; i++){
		if((i & 1) == 0) continue;
		dp[i] = 1;
		for(int j = (i-1)&i; j > 0; j = (j-1)&i){
			if((j & 1) == 0) continue;
			dp[i] -= dp[j]*pow(p, in[i]-(in[i-j]+in[j]));
		}
	}
	printf("%.11f\n", dp[N-1]);
	
	return 0;
}