// No.133 カードゲーム #include using namespace std; typedef long long ll; // const int INF = 2147483647; // const ll INF = 9223372036854775807; // const ll MOD = 1e9 + 7; int main(){ int N; cin >> N; vector A(N), B(N); for (int i=0; i> A[i]; } sort(A.begin(), A.end()); for (int i=0; i> B[i]; } sort(B.begin(), B.end()); int game_cnt = 0; int win_cnt = 0; do { game_cnt++; int a = 0, b = 0; for (int i=0; i B[i]) a++; else b++; } if (a > b) win_cnt++; } while (next_permutation(B.begin(), B.end())); float ans = (float)win_cnt / (float)game_cnt; cout << ans << endl; return 0; }