// g++ A.cpp -std=c++14 -I . && ./a.out #include using namespace std; // #include // using namespace atcoder; // using mint = modint1000000007; // using mint = modint998244353; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = a; i < (int)(b); i++) #define rrep(i, a, b) for (int i = a; i > (int)(b); i--) #define all(v) v.begin(), v.end() using ll = long long; const ll INF = 1e18; // 変数定義 ll N, M, C, Q, a, b, c, d, x, y, t, T, total, cnt, ans; int main() { cout << fixed << setprecision(10); ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N >> M >> C; vector A(N), B(M); rep(i, N) cin >> A[i]; rep(i, M) cin >> B[i]; sort(all(A)); sort(all(B)); int k = 0; rep(i, N) { rep2(j, k, M) { if (A[i] * B[j] > C) { ans += M - j; k = j; break; } } } cout << (double)ans / (N * M) << '\n'; return 0; }