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