結果
| 問題 | No.1280 Beyond C | 
| コンテスト | |
| ユーザー |  uw_yu1rabbit | 
| 提出日時 | 2021-01-17 01:39:41 | 
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 48 ms / 2,000 ms | 
| コード長 | 1,376 bytes | 
| コンパイル時間 | 3,967 ms | 
| コンパイル使用メモリ | 126,256 KB | 
| 最終ジャッジ日時 | 2025-01-17 23:56:27 | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<cstdint>
#include<cstddef>
#include<vector>
#include<algorithm>
#include<iomanip>
//#include<atcoder/all>
//using namespace atcoder;
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
using usize = size_t;
using u32 = uint_fast32_t;
using u64 = uint_fast64_t;
using i128 = __int128_t;
using u128 = __uint128_t;
template<typename T>
using vec = vector<T>;
#define rep(i, n) for (i64 i = 0; i < (i64)(n); ++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define len(hoge) (i64)((hoge).size())
using P = pair<i64,i64>;
vec<i64> a,b;
i64 binary_search(i64 &k, i64 &val){
    i64 lb = 0,ub = len(b);
    while(ub - lb > 1){
        i64 mid = (lb + ub) / 2;
        if(val * b[mid] <= k)lb = mid;
        else ub = mid;
    }
    return ub;
}
int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    i64 n,m,t;
    cin >> n >> m >> t;
    a.resize(n),b.resize(m);
    rep(i,n)cin >> a[i];
    rep(i,m)cin >> b[i];
    sort(all(a)),sort(all(b));
    i64 ans = n * m;
    rep(i,n){
        if(a[i] * b[0] > t)continue;
        i64 rec = binary_search(t,a[i]);
        ans -= rec;
    }
    cout << fixed << setprecision(10) << (long double)(ans * 1.0) / (long double)(1.0 * n * m) << endl;
}
            
            
            
        