結果
| 問題 | No.1280 Beyond C | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-11-08 20:52:49 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 43 ms / 2,000 ms | 
| コード長 | 720 bytes | 
| コンパイル時間 | 815 ms | 
| コンパイル使用メモリ | 85,032 KB | 
| 最終ジャッジ日時 | 2025-01-15 21:45:32 | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
using lint = long long;
using ldouble = long double;
void solve() {
    int n, m;
    lint c;
    std::cin >> n >> m >> c;
    std::vector<lint> xs(n), ys(m);
    for (auto& x : xs) std::cin >> x;
    for (auto& y : ys) std::cin >> y;
    std::sort(ys.begin(), ys.end());
    lint ans = 0;
    for (auto x : xs) {
        lint l = c / x;
        ans += ys.end() - std::upper_bound(ys.begin(), ys.end(), l);
    }
    std::cout << ldouble(ans) / (ldouble(n) * m) << "\n";
}
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    std::cout << std::fixed << std::setprecision(10);
    solve();
    return 0;
}
            
            
            
        