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 <iomanip>
#include <sstream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <climits>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;

vector<int> g[14];
double dp[1<<14];

int main() {
  int n,m,P;
  while(cin>>n>>m>>P) {
    REP(i,n) g[i].clear();
    REP(i,m) {
      int a, b;
      cin >> a >> b;
      a--;b--;
      g[a].push_back(b);
      g[b].push_back(a);
    }
    REP(S,1<<n) dp[S] = 1;
    REP(S,1<<n) {
      if (!(S&1)) continue;
      vector<int> v;
      REP(i,n) if (S>>i&1) v.push_back(i);
      REP(Q,1<<v.size()) {
        int T = 0;
        REP(i,v.size())
          if (Q>>i&1)
            T |= 1<<v[i];
        if (!(T&1)) continue;
        if (S==T) continue;
        double p = 1;
        REP(i,n) {
          if (T>>i&1) {
            FOR(it, g[i]) {
              if ((S^T)>>*it&1) {
                p = p*P/100;
              }
            }
          }
        }
        dp[S] -= dp[T] * p;
        // cout << bitset<4>(S) << " " << bitset<4>(T) << " " << p << endl;
      }
    }
    printf("%.10f\n", dp[(1<<n)-1]);
  }
}