結果
問題 |
No.1280 Beyond C
|
ユーザー |
|
提出日時 | 2020-11-06 21:36:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 611 bytes |
コンパイル時間 | 704 ms |
コンパイル使用メモリ | 79,556 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 12:22:24 |
合計ジャッジ時間 | 1,872 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); long long N, M, 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 kei = N * M; long long cnt = 0; for(int i = 0; i < N; i++){ cnt += b.end() - upper_bound(b.begin(), b.end(), C / a[i]); } double ans = (double)cnt / (double)kei; printf("%.10lf\n", ans); }