結果
| 問題 | No.1280 Beyond C | 
| コンテスト | |
| ユーザー |  ぷら | 
| 提出日時 | 2021-03-13 01:16:27 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 100 ms / 2,000 ms | 
| コード長 | 558 bytes | 
| コンパイル時間 | 1,734 ms | 
| コンパイル使用メモリ | 173,124 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-14 15:02:10 | 
| 合計ジャッジ時間 | 3,282 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
    long long N,M;
    long long C;
    cin >> N >> M >> C;
    vector<long long>a(N),b(M);
    for(int i = 0; i < N; i++) {
        cin >> a[i];
    }
    for(int i = 0; i < M; i++) {
        cin >> b[i];
    }
    sort(b.begin(),b.end());
    long long cnt = 0;
    for(int i = 0; i < N; i++) {
        long long tmp = C/a[i]+1;
        int it = lower_bound(b.begin(),b.end(),tmp)-b.begin();
        cnt += M-it;
    }
    cout << fixed << setprecision(18) << (long double)(cnt)/(N*M) << endl;
}
            
            
            
        