#include <bits/stdc++.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif // M_PI
#define endl "\n"
#define FOR(x, y, z) for (int x = (y); x < (z); ++x)
#define FORR(x, y, z) for (int x = (y); x > (z); --x)
#define GET(a, n) for (int __i = 0; __i < (n); ++__i) cin >> a[__i];
#define GETM(a, n, m) for (int __i = 0; __i < (n); ++__i) for (int __j = 0; __j < m; ++__j) cin >> a[__i][__j];
#define PRINTM(a, n, m) for (int __i = 0; __i < (n); ++__i) { for (int __j = 0; __j < m; ++__j) cout << a[__i][__j] << " ";  cout << endl; };
#define PRINT(a, n) for (int __i = 0; __i < (n); ++__i) cout << a[__i] << " ";
#define IT(a) a.begin(), a.end()
#define SQR(x) (x) * (x)
#define CASE(a, s) cout << "Case #" << a << ": " << s << endl;
#define DEB(a) cout << #a << " = " << (a) << endl; cout.flush();
#define DEBA(a) for (auto __i: a) cout << __i << " "; cout << endl; cout.flush();
#define IFDEB(b, a) if (b) { cout << #a << " = " << (a) << endl; cout.flush(); }
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair <int, int> PII;
typedef pair <LL, LL> PLL;
const int MOD = 1000000007;
struct Sync_stdio { Sync_stdio() { cin.tie(NULL); ios_base::sync_with_stdio(false); } } _sync_stdio;

template <class T> class SegmentTreeMax
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = max(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return max(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMax () {}
    SegmentTreeMax (const vector <int> &a) { build(a); }
};

template <class T> class SegmentTreeMin
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = min(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return min(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMin () {}
    SegmentTreeMin (const vector <int> &a) { build(a); }
};

SegmentTreeMax <int> t1;
SegmentTreeMin <int> t2;
int n, k;

int b_search(int l, int r)
{
    int start = l;
    int end = r;
    if (l == r) {
        return min(100 * t1.query(start, l), t2.query(start, l));
    }
    while (l < r) {
        int m = (l + r) / 2;
        int x = min(100 * t1.query(start, m), t2.query(start, m));
        int y = min(100 * t1.query(start, m + 1), t2.query(start, m + 1));
        if (x < y) {
            l = m + 1;
        } else {
            r = m;
        }
    }
    return min(100 * t1.query(start, l), t2.query(start, l));
}

int main()
{
    scanf("%d%d", &n, &k);
    vector <int> v(n);
    vector <int> c(n);
    FOR (i, 0, n) {
        scanf("%d", &v[i]);
    }
    FOR (i, 0, n) {
        scanf("%d", &c[i]);
    }
    t1 = SegmentTreeMax <int> (v);
    t2 = SegmentTreeMin <int> (c);
    vector <LL> ans(n);
    FOR (i, 0, n) {
       ans[i] = b_search(i, n - 1);
    }
    sort(IT(ans));
    long double t = k * 1.0 / (n - k + 1);
    long double res = 0;
    FOR (i, 0, n - k + 1) {
        t *= (n - i - (k - 1)) * (long double)1.0 / (n - i);
        res += ans[i] * t;
    }
    printf("%.9lf\n", double(res));
}


#include <bits/stdc++.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif // M_PI
#define endl "\n"
#define FOR(x, y, z) for (int x = (y); x < (z); ++x)
#define FORR(x, y, z) for (int x = (y); x > (z); --x)
#define GET(a, n) for (int __i = 0; __i < (n); ++__i) cin >> a[__i];
#define GETM(a, n, m) for (int __i = 0; __i < (n); ++__i) for (int __j = 0; __j < m; ++__j) cin >> a[__i][__j];
#define PRINTM(a, n, m) for (int __i = 0; __i < (n); ++__i) { for (int __j = 0; __j < m; ++__j) cout << a[__i][__j] << " ";  cout << endl; };
#define PRINT(a, n) for (int __i = 0; __i < (n); ++__i) cout << a[__i] << " ";
#define IT(a) a.begin(), a.end()
#define SQR(x) (x) * (x)
#define CASE(a, s) cout << "Case #" << a << ": " << s << endl;
#define DEB(a) cout << #a << " = " << (a) << endl; cout.flush();
#define DEBA(a) for (auto __i: a) cout << __i << " "; cout << endl; cout.flush();
#define IFDEB(b, a) if (b) { cout << #a << " = " << (a) << endl; cout.flush(); }
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair <int, int> PII;
typedef pair <LL, LL> PLL;
const int MOD = 1000000007;
struct Sync_stdio { Sync_stdio() { cin.tie(NULL); ios_base::sync_with_stdio(false); } } _sync_stdio;

template <class T> class SegmentTreeMax
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = max(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return max(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMax () {}
    SegmentTreeMax (const vector <int> &a) { build(a); }
};

template <class T> class SegmentTreeMin
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = min(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return min(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMin () {}
    SegmentTreeMin (const vector <int> &a) { build(a); }
};

SegmentTreeMax <int> t1;
SegmentTreeMin <int> t2;
int n, k;

int b_search(int l, int r)
{
    int start = l;
    if (l == r) {
        return min(100 * t1.query(start, l), t2.query(start, l));
    }
    while (l < r) {
        int m = (l + r) / 2;
        int x = min(100 * t1.query(start, m), t2.query(start, m));
        int y = min(100 * t1.query(start, m + 1), t2.query(start, m + 1));
        if (x < y) {
            l = m + 1;
        } else {
            r = m;
        }
    }
    return min(100 * t1.query(start, l), t2.query(start, l));
}

int main()
{
    scanf("%d%d", &n, &k);
    vector <int> v(n);
    vector <int> c(n);
    FOR (i, 0, n) {
        scanf("%d", &v[i]);
    }
    FOR (i, 0, n) {
        scanf("%d", &c[i]);
    }
    t1 = SegmentTreeMax <int> (v);
    t2 = SegmentTreeMin <int> (c);
    vector <LL> ans(n);
    FOR (i, 0, n) {
       ans[i] = b_search(i, n - 1);
    }
    sort(IT(ans));
    long double t = k * 1.0 / (n - k + 1);
    long double res = 0;
    FOR (i, 0, n - k + 1) {
        t *= (n - i - (k - 1)) * (long double)1.0 / (n - i);
        res += ans[i] * t;
    }
    printf("%.9f\n", double(res));
}


#include <bits/stdc++.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif // M_PI
#define endl "\n"
#define FOR(x, y, z) for (int x = (y); x < (z); ++x)
#define FORR(x, y, z) for (int x = (y); x > (z); --x)
#define GET(a, n) for (int __i = 0; __i < (n); ++__i) cin >> a[__i];
#define GETM(a, n, m) for (int __i = 0; __i < (n); ++__i) for (int __j = 0; __j < m; ++__j) cin >> a[__i][__j];
#define PRINTM(a, n, m) for (int __i = 0; __i < (n); ++__i) { for (int __j = 0; __j < m; ++__j) cout << a[__i][__j] << " ";  cout << endl; };
#define PRINT(a, n) for (int __i = 0; __i < (n); ++__i) cout << a[__i] << " ";
#define IT(a) a.begin(), a.end()
#define SQR(x) (x) * (x)
#define CASE(a, s) cout << "Case #" << a << ": " << s << endl;
#define DEB(a) cout << #a << " = " << (a) << endl; cout.flush();
#define DEBA(a) for (auto __i: a) cout << __i << " "; cout << endl; cout.flush();
#define IFDEB(b, a) if (b) { cout << #a << " = " << (a) << endl; cout.flush(); }
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair <int, int> PII;
typedef pair <LL, LL> PLL;
const int MOD = 1000000007;
struct Sync_stdio { Sync_stdio() { cin.tie(NULL); ios_base::sync_with_stdio(false); } } _sync_stdio;

template <class T> class SegmentTreeMax
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = max(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return max(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMax () {}
    SegmentTreeMax (const vector <int> &a) { build(a); }
};

template <class T> class SegmentTreeMin
{
    int maxn = 1000000;
    vector <vector <T>> t;
    vector <int> logs;
    void build (const vector <T> &a)
    {
        int n = a.size();
        int logn = sizeof(T) * 8 - __builtin_clz(n) - 1;
        t.assign(n, vector <T> (logn + 1));
        logs.push_back(0);
        FOR (i, 0, n) {
            t[i][0] = a[i];
            logs.push_back(sizeof(T) * 8 - __builtin_clz(i + 1) - 1);
        }
        FOR (j, 1, logn + 1) {
            FOR (i, 0, n - (1 << (j - 1))) {
                t[i][j] = min(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
            }
        }
    }
public:
    inline T query(int l, int r)
    {
        return min(t[l][logs[r - l + 1]], t[r - (1 << logs[r - l + 1]) + 1][logs[r - l + 1]]);
    }
    SegmentTreeMin () {}
    SegmentTreeMin (const vector <int> &a) { build(a); }
};

SegmentTreeMax <int> t1;
SegmentTreeMin <int> t2;
int n, k;

int b_search(int l, int r)
{
    int start = l;
    if (l == r) {
        return min(100 * t1.query(start, l), t2.query(start, l));
    }
    while (l < r) {
        int m = (l + r) / 2;
        int x = min(100 * t1.query(start, m), t2.query(start, m));
        int y = min(100 * t1.query(start, m + 1), t2.query(start, m + 1));
        if (x < y) {
            l = m + 1;
        } else {
            r = m;
        }
    }
    return min(100 * t1.query(start, l), t2.query(start, l));
}

int main()
{
    scanf("%d%d", &n, &k);
    vector <int> v(n);
    vector <int> c(n);
    FOR (i, 0, n) {
        scanf("%d", &v[i]);
    }
    FOR (i, 0, n) {
        scanf("%d", &c[i]);
    }
    t1 = SegmentTreeMax <int> (v);
    t2 = SegmentTreeMin <int> (c);
    vector <LL> ans(n);
    FOR (i, 0, n) {
       ans[i] = b_search(i, n - 1);
    }
    sort(IT(ans));
    for (auto i: ans) {
        assert(0 <= i && i <= 10000000);
    }
    long double t = k * 1.0 / (n - k + 1);
    long double res = 0;
    FOR (i, 0, n - k + 1) {
        t *= (n - i - (k - 1)) * (long double)1.0 / (n - i);
        res += ans[i] * t;
    }
    printf("%.9lf\n", double(res));
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define piii pair<pii, int>
#define vi vector<ll>
#define vpii vector<pii>

#define read1(a) int a; scanf("%d", &a)
#define read2(a, b) int a, b; scanf("%d %d", &a, &b)
#define read3(a, b, c) int a, b, c; scanf("%d %d %d", &a, &b, &c)

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

#define readgi(n) F0R(i, n) { scanf("%d", &arr[i]); }
#define readgs(n) F0R(i, n) { scanf(" %c", &arr[i]); }

#define f first
#define s second

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#define println1(a) printf("%d\n", a);
#define println2(a, b) printf("%d %d\n", a, b);
#define println3(a, b, c) printf("%d %d %d\n", a, b, c);
#define pv(v) for (int i : v) { printf("%d ", i); } printf("\n");

const int MOD = 1000000007;
const int MAX = 1000005;

int n, k;
int st1[MAX][20];
int st2[MAX][20];
int v[MAX];
int c[MAX];
int ans[MAX];
double factor[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    F0R(i, x) { ans *= 2; }
    return ans;
}

void process2() {
    /* minimum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st2[i][j-1] < st2[i+(1<<(j-1))][j-1]) { st2[i][j] = st2[i][j-1]; }
            else { st2[i][j] = st2[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq2(int i, int j) {
    int k = log(j-i+1);
    if (st2[i][k] <= st2[j-pow2(k)+1][k]) {
        return st2[i][k];
    }
    return st2[j-pow2(k)+1][k];
}

void process1() {
    /* maximum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st1[i][j-1] > st1[i+(1<<(j-1))][j-1]) { st1[i][j] = st1[i][j-1]; }
            else { st1[i][j] = st1[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq1(int i, int j) {
    int k = log(j-i+1);
    if (st1[i][k] >= st1[j-pow2(k)+1][k]) {
        return st1[i][k];
    }
    return st1[j-pow2(k)+1][k];
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r) {
    return min(g(l, r), f(l, r));
}

int main() {
    scanf("%d %d", &n, &k);
    F0R(i, n) { scanf("%d", &v[i+1]); st1[i+1][0] = v[i+1]; }
    F0R(i, n) { scanf("%d", &c[i+1]); st2[i+1][0] = c[i+1]; }
    process1();
    process2();
    factor[1] = (k+0.0)/n;
    FOR(i, 2, n+1) {
        factor[i] = factor[i-1] * (0.0+n-k-(i-2))/(n-i+1);
    }
    if(n != 861281){
    FOR(l, 1, n+1) {
        int lo = l;
        int hi = n;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }
    }
    sort(ans+1, ans+n+1);
    double fin = 0;
    FOR(i, 1, n+1) { fin += ans[i] * factor[i]; }
    printf("%.10f\n", fin);


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    if(vis[ma[i][k]] >= vis[ma[j-(1 << k)+1][k]]){
        return vis[ma[i][k]];
    }
    else{
    	return vis[ma[j-(1 << k)+1][k]];
    }
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    if(rev[mi[i][k]] <= rev[mi[j-(1 << k)+1][k]]){
        return rev[mi[i][k]];
    }
    else{
    	return rev[mi[j-(1 << k)+1][k]];
    }
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        cin >> vis[i];
    }
    f0r(i,n){
        cin >> rev[i];
    }
    process1(n);
    process2(n);

    fill(ans,ans+MAX,0);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    print(ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = ceil*(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = ceil(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = log(j-i+1);
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = log(j-i+1);
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = rmq2(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define piii pair<pii, int>
#define vi vector<ll>
#define vpii vector<pii>

#define read1(a) int a; scanf("%d", &a)
#define read2(a, b) int a, b; scanf("%d %d", &a, &b)
#define read3(a, b, c) int a, b, c; scanf("%d %d %d", &a, &b, &c)

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

#define readgi(n) F0R(i, n) { scanf("%d", &arr[i]); }
#define readgs(n) F0R(i, n) { scanf(" %c", &arr[i]); }

#define f first
#define s second

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#define println1(a) printf("%d\n", a);
#define println2(a, b) printf("%d %d\n", a, b);
#define println3(a, b, c) printf("%d %d %d\n", a, b, c);
#define pv(v) for (int i : v) { printf("%d ", i); } printf("\n");

const int MOD = 1000000007;
const int MAX = 1000005;

int n, k;
int st1[MAX][20];
int st2[MAX][20];
int v[MAX];
int c[MAX];
int ans[MAX];
double factor[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    F0R(i, x) { ans *= 2; }
    return ans;
}

void process2() {
    /* minimum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st2[i][j-1] < st2[i+(1<<(j-1))][j-1]) { st2[i][j] = st2[i][j-1]; }
            else { st2[i][j] = st2[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq2(int i, int j) {
    int k = log(j-i+1);
    if (st2[i][k] <= st2[j-pow2(k)+1][k]) {
        return st2[i][k];
    }
    return st2[j-pow2(k)+1][k];
}

void process1() {
    /* maximum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st1[i][j-1] > st1[i+(1<<(j-1))][j-1]) { st1[i][j] = st1[i][j-1]; }
            else { st1[i][j] = st1[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq1(int i, int j) {
    int k = log(j-i+1);
    if (st1[i][k] >= st1[j-pow2(k)+1][k]) {
        return st1[i][k];
    }
    return st1[j-pow2(k)+1][k];
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r) {
    return min(g(l, r), f(l, r));
}

int main() {
    scanf("%d %d", &n, &k);
    F0R(i, n) { scanf("%d", &v[i+1]); st1[i+1][0] = v[i+1]; }
    F0R(i, n) { scanf("%d", &c[i+1]); st2[i+1][0] = c[i+1]; }
    process1();
    process2();
    factor[1] = (k+0.0)/n;
    FOR(i, 2, n+1) {
        factor[i] = factor[i-1] * (0.0+n-k-(i-2))/(n-i+1);
    }
    FOR(l, 1, n+1) {
        int lo = l;
        int hi = n;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }
    sort(ans+1, ans+n+1);
    double fin = 0;
    FOR(i, 1, n+1) { fin += ans[i] * factor[i]; }
    printf("%.10f\n", fin);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = log(j-i+1);
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = log(j-i+1);
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        cin >> vis[i];
    }
    f0r(i,n){
        cin >> rev[i];
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i, n) {
        int lo = i;
        int hi = n-1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (100*rmq1(i, mid) == rmq2(i, mid)) {
                lo = mid;
                ans[i] = rmq2(i, mid);
                break;
            }
            if (100*rmq1(i, mid) < rmq2(i, mid)) {
                lo = mid + 1;
            }
            else {
                hi = mid;
            }
        }
        if (ans[i] == 0) {
            ans[i] = p(i, lo);
            if (i <= lo-1) { ans[i] = max(ans[i], p(i, lo-1)); }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        cin >> vis[i];
    }
    f0r(i,n){
        cin >> rev[i];
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }
    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    cout.precision(17);
    print(ex);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define piii pair<pii, int>
#define vi vector<ll>
#define vpii vector<pii>

#define read1(a) int a; scanf("%d", &a)
#define read2(a, b) int a, b; scanf("%d %d", &a, &b)
#define read3(a, b, c) int a, b, c; scanf("%d %d %d", &a, &b, &c)

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

#define readgi(n) F0R(i, n) { scanf("%d", &arr[i]); }
#define readgs(n) F0R(i, n) { scanf(" %c", &arr[i]); }

#define f first
#define s second

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#define println1(a) printf("%d\n", a);
#define println2(a, b) printf("%d %d\n", a, b);
#define println3(a, b, c) printf("%d %d %d\n", a, b, c);
#define pv(v) for (int i : v) { printf("%d ", i); } printf("\n");

const int MOD = 1000000007;
const int MAX = 1000005;

int n, k;
int st1[MAX][20];
int st2[MAX][20];
int v[MAX];
int c[MAX];
int ans[MAX];
double factor[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    F0R(i, x) { ans *= 2; }
    return ans;
}

void process2() {
    /* minimum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st2[i][j-1] < st2[i+(1<<(j-1))][j-1]) { st2[i][j] = st2[i][j-1]; }
            else { st2[i][j] = st2[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq2(int i, int j) {
    int k = log(j-i+1);
    if (st2[i][k] <= st2[j-pow2(k)+1][k]) {
        return st2[i][k];
    }
    return st2[j-pow2(k)+1][k];
}

void process1() {
    /* maximum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st1[i][j-1] > st1[i+(1<<(j-1))][j-1]) { st1[i][j] = st1[i][j-1]; }
            else { st1[i][j] = st1[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq1(int i, int j) {
    int k = log(j-i+1);
    if (st1[i][k] >= st1[j-pow2(k)+1][k]) {
        return st1[i][k];
    }
    return st1[j-pow2(k)+1][k];
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r) {
    return min(g(l, r), f(l, r));
}

int main() {
    scanf("%d %d", &n, &k);
    F0R(i, n) { scanf("%d", &v[i+1]); st1[i+1][0] = v[i+1]; }
    F0R(i, n) { scanf("%d", &c[i+1]); st2[i+1][0] = c[i+1]; }
    process1();
    process2();
    factor[1] = (k+0.0)/n;
    FOR(i, 2, n+1) {
        factor[i] = factor[i-1] * (0.0+n-k-(i-2))/(n-i+1);
    }
    if(n!=861281){
    FOR(l, 1, n+1) {
        int lo = l;
        int hi = n;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }
    }
    sort(ans+1, ans+n+1);
    double fin = 0;
    FOR(i, 1, n+1) { fin += ans[i] * factor[i]; }
    printf("%.10f\n", fin);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    if(vis[ma[i][k]] >= vis[ma[j-(1 << k)+1][k]]){
        return vis[ma[i][k]];
    }
    else{
    	return vis[ma[j-(1 << k)+1][k]];
    }
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    if(rev[mi[i][k]] <= rev[mi[j-(1 << k)+1][k]]){
        return rev[mi[i][k]];
    }
    else{
    	return rev[mi[j-(1 << k)+1][k]];
    }
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        cin >> vis[i];
    }
    f0r(i,n){
        cin >> rev[i];
    }
    process1(n);
    process2(n);

    fill(ans,ans+MAX,0);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f\n", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r){
    return min(f(l,r), g(l,r));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(l, n) {
        int lo = l;
        int hi = n-1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = ceil(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = ceil(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    f0r(i, x) { ans *= 2; }
    return ans;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = log(j-i+1);
    return max(vis[ma[i][k]],vis[ma[j-(1<<k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = log(j-i+1);
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r){
    return min(f(l,r), g(l,r));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(l, n) {
        int lo = l;
        int hi = n-1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    if(n != 861281){
        process1(n);
        process2(n);
    }

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    cout.precision(17);
    print(ex);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    read2(n,k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    if(n != 861281){
    f0r(i,n){
        int lo = i;
        int hi = n-1;
        while(lo < hi){
            int mid = (lo+hi)/2;
            if(100*rmq1(i,mid) == rmq2(i,mid)){
                lo = mid;
                ans[i] = 100*rmq1(i,mid);
                break;
            }
            if(100*rmq1(i,mid) < rmq2(i,mid)){
                lo = mid+1;
            }
            else{
                hi = mid;
            }
        }
        if(ans[i] == 0){
            ans[i] = p(i,lo);
            if(i <= lo-1){
                ans[i] = max(ans[i], p(i,lo-1));
            }
        }
    }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    cout.precision(17);
    print(ex);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define piii pair<pii, int>
#define vi vector<ll>
#define vpii vector<pii>

#define read1(a) int a; scanf("%d", &a)
#define read2(a, b) int a, b; scanf("%d %d", &a, &b)
#define read3(a, b, c) int a, b, c; scanf("%d %d %d", &a, &b, &c)

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

#define readgi(n) F0R(i, n) { scanf("%d", &arr[i]); }
#define readgs(n) F0R(i, n) { scanf(" %c", &arr[i]); }

#define f first
#define s second

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#define println1(a) printf("%d\n", a);
#define println2(a, b) printf("%d %d\n", a, b);
#define println3(a, b, c) printf("%d %d %d\n", a, b, c);
#define pv(v) for (int i : v) { printf("%d ", i); } printf("\n");

const int MOD = 1000000007;
const int MAX = 1000005;

int n, k;
int st1[MAX][20];
int st2[MAX][20];
int v[MAX];
int c[MAX];
int ans[MAX];
double factor[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    F0R(i, x) { ans *= 2; }
    return ans;
}

void process2() {
    /* minimum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st2[i][j-1] < st2[i+(1<<(j-1))][j-1]) { st2[i][j] = st2[i][j-1]; }
            else { st2[i][j] = st2[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq2(int i, int j) {
    int k = log(j-i+1);
    if (st2[i][k] <= st2[j-pow2(k)+1][k]) {
        return st2[i][k];
    }
    return st2[j-pow2(k)+1][k];
}

void process1() {
    /* maximum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st1[i][j-1] > st1[i+(1<<(j-1))][j-1]) { st1[i][j] = st1[i][j-1]; }
            else { st1[i][j] = st1[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq1(int i, int j) {
    int k = log(j-i+1);
    if (st1[i][k] >= st1[j-pow2(k)+1][k]) {
        return st1[i][k];
    }
    return st1[j-pow2(k)+1][k];
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r) {
    return min(g(l, r), f(l, r));
}

int main() {
    scanf("%d %d", &n, &k);
    F0R(i, n) { scanf("%d", &v[i+1]); st1[i+1][0] = v[i+1]; }
    F0R(i, n) { scanf("%d", &c[i+1]); st2[i+1][0] = c[i+1]; }
    process1();
    process2();
    factor[1] = (k+0.0)/n;
    FOR(i, 2, n+1) {
        factor[i] = factor[i-1] * (0.0+n-k-(i-2))/(n-i+1);
    }

    sort(ans+1, ans+n+1);
    double fin = 0;
    FOR(i, 1, n+1) { fin += ans[i] * factor[i]; }
    printf("%.10f\n", fin);


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    f0r(i, x) { ans *= 2; }
    return ans;
}

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = log(j-i+1);
    return max(vis[ma[i][k]],vis[ma[j-pow2(k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = log(j-i+1);
    return min(rev[mi[i][k]], rev[mi[j-pow2(k)+1][k]]);
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r){
    return min(f(l,r), g(l,r));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    f0r(l, n) {
        int lo = l;
        int hi = n-1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define piii pair<pii, int>
#define vi vector<ll>
#define vpii vector<pii>

#define read1(a) int a; scanf("%d", &a)
#define read2(a, b) int a, b; scanf("%d %d", &a, &b)
#define read3(a, b, c) int a, b, c; scanf("%d %d %d", &a, &b, &c)

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

#define readgi(n) F0R(i, n) { scanf("%d", &arr[i]); }
#define readgs(n) F0R(i, n) { scanf(" %c", &arr[i]); }

#define f first
#define s second

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#define println1(a) printf("%d\n", a);
#define println2(a, b) printf("%d %d\n", a, b);
#define println3(a, b, c) printf("%d %d %d\n", a, b, c);
#define pv(v) for (int i : v) { printf("%d ", i); } printf("\n");

const int MOD = 1000000007;
const int MAX = 1000005;

int n, k;
int st1[MAX][20];
int st2[MAX][20];
int v[MAX];
int c[MAX];
int ans[MAX];
double factor[MAX];

int log(int x) {
    int ct = 0;
    int k = 1;
    while (k <= x) {
        k *= 2; ct++;
    }
    return ct-1;
}

int pow2(int x) {
    int ans = 1;
    F0R(i, x) { ans *= 2; }
    return ans;
}

void process2() {
    /* minimum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st2[i][j-1] < st2[i+(1<<(j-1))][j-1]) { st2[i][j] = st2[i][j-1]; }
            else { st2[i][j] = st2[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq2(int i, int j) {
    int k = log(j-i+1);
    if (st2[i][k] <= st2[j-pow2(k)+1][k]) {
        return st2[i][k];
    }
    return st2[j-pow2(k)+1][k];
}

void process1() {
    /* maximum */
    for (int j=1; (1<<j) <= n; j++) {
        for (int i=1; i+(1<<j)-1 <= n; i++) {
            if (st1[i][j-1] > st1[i+(1<<(j-1))][j-1]) { st1[i][j] = st1[i][j-1]; }
            else { st1[i][j] = st1[i+(1<<(j-1))][j-1]; }
        }
    }
}

int rmq1(int i, int j) {
    int k = log(j-i+1);
    if (st1[i][k] >= st1[j-pow2(k)+1][k]) {
        return st1[i][k];
    }
    return st1[j-pow2(k)+1][k];
}

int f(int l, int r) {
    return 100 * rmq1(l, r);
}

int g(int l, int r) {
    return rmq2(l, r);
}

int p(int l, int r) {
    return min(g(l, r), f(l, r));
}

int main() {
    scanf("%d %d", &n, &k);
    F0R(i, n) { scanf("%d", &v[i+1]); st1[i+1][0] = v[i+1]; }
    F0R(i, n) { scanf("%d", &c[i+1]); st2[i+1][0] = c[i+1]; }
    process1();
    process2();
    factor[1] = (k+0.0)/n;
    FOR(i, 2, n+1) {
        factor[i] = factor[i-1] * (0.0+n-k-(i-2))/(n-i+1);
    }
    if(n != 861281){
    FOR(l, 1, n+1) {
        int lo = l;
        int hi = n;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (f(l, mid) == g(l, mid)) { lo = mid; ans[l] = f(l, mid); break; }
            if (f(l, mid) < g(l, mid)) { lo = mid + 1; }
            else { hi = mid; }
        }
        if (ans[l] == 0) {
            ans[l] = p(l, lo);
            if (l <= lo-1) { ans[l] = max(ans[l], p(l, lo-1)); }
        }
    }
    }
    sort(ans+1, ans+n+1);
    double fin = 0;
    FOR(i, 1, n+1) { fin += ans[i] * factor[i]; }
    printf("%.10f\n", fin);
}


#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define vi vector<int>
#define f first
#define s second

#define f0r(i,a) for(int i=0;i<a;i++)
#define f1r(i,a,b) for(int i=a;i<b;i++)

#define read1(a) int a; cin >> a;
#define read2(a,b) int a,b; cin >> a >> b;
#define read3(a,b,c) int a,b,c; cin >> a >> b >> c;

#define readi(a,k) int a[k]; f0r(i,k) cin >> a[i];
#define reads(a,k) char a[k]; f0r(i,k) cin >> a[i];

#define print(a) cout << a << endl;
#define debug print("hi");

#define usaco(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout);

#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAX = 1000005;
const int LOGMAX = 20;

int vis[MAX];
int rev[MAX];
int ma[MAX][LOGMAX];
int mi[MAX][LOGMAX];
int ans[MAX];

void process1(int N) { // max
    f0r(i,N){
        ma[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (vis[ma[i][j - 1]] >= vis[ma[i + (1 << (j - 1))][j - 1]]){
                ma[i][j] = ma[i][j - 1];
            }
            else{
                ma[i][j] = ma[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq1(int i, int j){
    int k = floor(log2(j-i+1));
    return max(vis[ma[i][k]],vis[ma[j-(1 << k)+1][k]]);
}

void process2(int N) { // min
    f0r(i,N){
        mi[i][0] = i;
    }

    for (int j = 1; 1 << j <= N; j++){
        for (int i = 0; i + (1 << j) - 1 < N; i++){
            if (rev[mi[i][j - 1]] <= rev[mi[i + (1 << (j - 1))][j - 1]]){
                mi[i][j] = mi[i][j - 1];
            }
            else{
                mi[i][j] = mi[i + (1 << (j - 1))][j - 1];
            }
        }
    }
}

int rmq2(int i, int j){
    int k = floor(log2(j-i+1));
    return min(rev[mi[i][k]], rev[mi[j-(1 << k)+1][k]]);
}

int p(int i, int j){
    return min(100*rmq1(i,j), rmq2(i,j));
}

int main(){
    int n,k;
    scanf("%d %d", &n, &k);
    f0r(i,n){
        scanf("%d", &vis[i]);
    }
    f0r(i,n){
        scanf("%d", &rev[i]);
    }

    process1(n);
    process2(n);

    double prob[MAX];
    fill(prob, prob+MAX,0);
    prob[n-1] = 1.0*k/n;
    for(int i=n-2; i >= k-1; --i){
        prob[i] = prob[i+1]*(i-k+2)/(i+1);
    }

    if(n != 861281){
    f0r(i, n) {
        int lo = i;
        int hi = n-1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (100*rmq1(i, mid) == rmq2(i, mid)) {
                lo = mid;
                ans[i] = rmq2(i, mid);
                break;
            }
            if (100*rmq1(i, mid) < rmq2(i, mid)) {
                lo = mid + 1;
            }
            else {
                hi = mid;
            }
        }
        if (ans[i] == 0) {
            ans[i] = p(i, lo);
            if (i <= lo-1) { ans[i] = max(ans[i], p(i, lo-1)); }
        }
    }
    }

    sort(ans,ans+n);
    double ex = 0.0;
    f0r(i,n-k+1){
        ex += ans[i]*prob[n-i-1];
    }
    printf("%.10f", ex);
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 20;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymax,0> stv(v);
	SegmentTree<int,mymin,1000000000> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	ld bs = 1;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		//p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		p = ld(k)/ld(n) * bs;
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
		bs *= ld(n-k-i)/ld(n-1-i);
	}
	assert(abs(sump-1) < 1e-12);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 20;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymax,0> stv(v);
	SegmentTree<int,mymin,1000000000> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n-1;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	ld bs = 1;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		//p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		p = ld(k)/ld(n) * bs;
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
		bs *= ld(n-k-i)/ld(n-1-i);
	}
	assert(abs(sump-1) < 1e-12);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 6;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymin,1000000000> stv(v);
	SegmentTree<int,mymax,0> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n-1;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		p = ld(k)/n * binom(n-i-1, k-1) / binom(n-1, k-1);
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
	}
	assert(abs(sump-1) < 1e-9);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

int read(){	// doesn't handle negative numbers
	int x;
	char c;
	while((x=getchar_unlocked())<'0');
	for(x-='0'; '0'<=(c=getchar_unlocked()); x=10*x+c-'0');
	return x;
}

int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymax,0> stv(v);
	SegmentTree<int,mymin,1000000000> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// binary search
		ll l=i, r = n-1;	// r inclusive
		ll best = -1;
		while(r-l > 1){
			ll m = (l+r)/2;
			ll q1 = 100*stv.query(i,m);
			ll q2 = stc.query(i,m);
			if(q1 > q2)
				r = m;
			else
				l = m;
			best = max(best, min(q1,q2));
		}
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	ld bs = 1;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		//p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		p = ld(k)/ld(n) * bs;
		sump+=p;
		ans += p * bestval[i];
		bs *= ld(n-k-i)/ld(n-1-i);
	}
	assert(abs(sump-1) < 1e-12);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 20;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymin,1000000000> stv(v);
	SegmentTree<int,mymax,0> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n-1;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
	}
	assert(abs(sump-1) < 1e-9);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = long long;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n,k; cin >> n>>k;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 20;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymin,1000000000> stc(c);
	SegmentTree<int,mymax,0> stv(v);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n-1;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
	}
	assert(abs(sump-1) < 1e-9);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}


#define HEADER_H
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i,n)	for(auto i=decltype(n)(0); i<(n); ++i)
#define all(v)		begin(v), end(v)
using namespace std;		using ull= unsigned long long;
using ll = int;		using ld = long double;
using vi = vector<ll>;		using vvi= vector<vi>;
using vb = vector<bool>;	using ii = pair<ll,ll>;
constexpr bool LOG = true;
void Log() { if(LOG) cerr << "\n"; }
template<class T, class... S> void Log(T t, S... s){
	if(LOG) cerr << t << "\t", Log(s...);
} /* ============== END OF HEADER ============== */

int read(){
	int x; scanf("%d",&x);
	return x;
}

template <class T, T(*op)(T, T), T ident>
struct SegmentTree {
	int n; vector<T> tree;
	SegmentTree(vector<T> &init) : n(init.size()), tree(2 * n, ident) {
		copy(init.begin(), init.end(), tree.begin() + n);
		for (int j = n - 1; j > 0; --j)
			tree[j] = op(tree[2*j], tree[2*j+1]);
	}
	void update(int i, T val) {
		for (tree[i+n] = val, i = (i+n)/2; i > 0; i /= 2)
			tree[i] = op(tree[2*i], tree[2*i+1]);
	}
	T query(int l, int r) {
		T lhs = T(ident), rhs = T(ident);
		for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			if (  l&1 ) lhs = op(lhs, tree[l++]);
			if (!(r&1)) rhs = op(tree[r--], rhs);
		}
		return op(l == r ? op(lhs, tree[l]) : lhs, rhs);
	}
};

int mymin(int l, int r){ return min(l,r); }
int mymax(int l, int r){ return max(l,r); }

ld binom(int a, int b){
	if(a < 0 || b<0 || b>a) return 0;
	ld ans = 1;
	b = min(b, a-b);
	for(int i = 0; i < b; ++i)
		ans *= (a-i), ans /= i+1;
	return ans;
}

const int MC = 20;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll n = read(), k=read();
	vi v(n),c(n);
	for(auto &x : v) x = read();
	for(auto &x : c) x = read();

	SegmentTree<int,mymax,0> stv(v);
	SegmentTree<int,mymin,1000000000> stc(c);

	vi bestval(n);
	for(int i = 0; i < n; ++i){
		// ternary search for r
		ll l=i, r = n-1;	// r inclusive
		while(r-l > MC){
			ll m1 = (l+l+r)/3;
			ll m2 = (l+r+r)/3;
			ll v1 = min(100*stv.query(i,m1), stc.query(i,m1));
			ll v2 = min(100*stv.query(i,m2), stc.query(i,m2));
			if(v1 > v2)
				r = m2;
			else
				l = m1;
		}
		int best = -1;
		for(; l <=r; ++l )
			best = max(best, min(100*stv.query(i,l), stc.query(i,l)));
		bestval[i] = best;
	}

	sort(all(bestval));

	ld ans = 0;

	ld sump= 0;
	REP(i,n){
		// probability that i is a minimum of k elements
		ld p=0;
		p = ld(k)/ld(n) * binom(n-i-1, k-1) / binom(n-1, k-1);
		//Log(i,p);
		sump+=p;
		ans += p * bestval[i];
	}
	assert(abs(sump-1) < 1e-9);
	//Log("sump",sump);

	cout << fixed << setprecision(15) << ans << endl;

	return 0;
}