#include using namespace std; typedef long long ll; typedef unsigned long long ull; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout.precision(12); cout.setf(ios_base::fixed, ios_base::floatfield); int n; int a[4], b[4]; cin >> n; for(int i=0;i> a[i]; for(int i=0;i> b[i]; int game = 0, win = 0; int pa[4], pb[4]; iota(pa, pa+4, 0); do{ iota(pb, pb+4, 0); do{ int aw = 0, bw = 0; for(int i=0;i b[pb[i]]) aw++; if(a[pa[i]] < b[pb[i]]) bw++; } game++; if(aw > bw) win++; }while(next_permutation(pb, pb+n)); }while(next_permutation(pa, pa+n)); cout << (win+0.0)/game << endl; return 0; }