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>
using namespace std;

#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define REP(i, n) FOR(i, 0, n)

struct Edge {
    int src, dst;
};
using Graph = vector<vector<Edge>>;

void print_float(double x, int precision=15) {
    cout.setf(ios::fixed);
    cout.precision(precision);
    cout << x << '\n';
}

int main() {
    cin.tie(0); ios_base::sync_with_stdio(false);

    int N, M, P;
    while (cin >> N >> M >> P) {
        double p = P/100.0;
        Graph graph(N);
        vector<Edge> edges;
        REP(i, M) {
            int u, v; cin >> u >> v; --u; --v;
            edges.push_back((Edge){u, v});
        }

        vector<double> dp(1<<N);
        REP(S, 1<<N) {
            double q = 0;
            for (int T = (S-1)&S; T; T = (T-1)&S) {
                if ((T&-T) != (S&-S)) continue;
                int k = 0;
                REP(i, M) {
                    int x = 1 << edges[i].src;
                    int y = 1 << edges[i].dst;
                    if ((x&S) && (y&S) && !(x&T) != !(y&T))
                        ++k;
                }
                q += dp[T] * pow(p, k);
            }
            dp[S] = 1 - q;
        }
        print_float(dp[(1<<N)-1]);
    }
}