結果

問題 No.1280 Beyond C
ユーザー face4face4
提出日時 2020-12-05 17:26:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 523 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 80,980 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-15 18:04:44
合計ジャッジ時間 2,974 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<iomanip>
#include<algorithm>
using namespace std;
typedef long long ll;

int main(){
    int n, m;
    ll c;
    cin >> n >> m >> c;
    vector<int> 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());
    double d = 0;
    for(int i = 0; i < n; i++){
        d += 1.0/n * (b.end()-lower_bound(b.begin(),b.end(),c/a[i]+1))/m;
    }
    cout << fixed << setprecision(12) << d << endl;
    return 0;
}
0