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:
/*
 * 2345.cc: Network Reliability
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 14;
const int NBITS = 1 << MAX_N;

/* typedef */

typedef pair<int,int> pii;

/* global variables */

pii es[MAX_N];
double dp[NBITS];

/* subroutines */

/* main */

int main() {
  int n, m;
  double p;
  cin >> n >> m >> p;

  int nbits = 1 << n;
  p /= 100;
  memset(es, false, sizeof(es));

  for (int i = 0; i < m; i++) {
    cin >> es[i].first >> es[i].second;
    es[i].first--, es[i].second--;
  }

  for (int bits = 0; bits < nbits; bits++) dp[bits] = 0.0;
  
  for (int bits = 1; bits < nbits; bits++) {
    int b0 = 1;
    for (; ! (bits & b0); b0 <<= 1);
    dp[bits] = 1.0;
    
    for (int s0 = (bits - 1) & bits; s0 != 0; s0 = (s0 - 1) & bits)
      if (s0 & b0) {
	int s1 = bits & ~s0;
	double pp = dp[s0];
	for (int j = 0; j < m; j++) {
	  int &u = es[j].first, &v = es[j].second;
	  int bu = 1 << u, bv = 1 << v;
	  if ((bits & bu) && (bits & bv) &&
	      (((s0 & bu) && ! (s0 & bv)) || ((! (s0 & bu) && (s0 & bv)))))
	    pp *= p;
	}
	dp[bits] -= pp;
      }
  }

  printf("%.12lf\n", dp[nbits - 1]);
  return 0;
}