#include #include #include #include #include #include #include #include #include // #include using namespace std; #define ll long long int N; int main(){ cin >> N; vector A(N); vector B(N); for(int i=0; i> A[i]; } for(int i=0; i> B[i]; } sort(A.begin(), A.end()); int ans=0; int cnt=0; do{ int win=0; for(int i=0; i B[i]){ win++; } } if(win*2>N){ ans++; } cnt++; }while(next_permutation(A.begin(), A.end())); cout << ((double)(ans))/((double)(cnt)) << endl; return 0; }