結果
| 問題 |
No.1280 Beyond C
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-27 20:48:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 105 ms / 2,000 ms |
| コード長 | 640 bytes |
| コンパイル時間 | 2,016 ms |
| コンパイル使用メモリ | 199,912 KB |
| 最終ジャッジ日時 | 2025-02-25 00:55:55 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i)
#define all(a) (a).begin(), (a).end()
int main() {
cin.tie(nullptr);
ll N, M, C;
cin >> N >> M >> C;
vector<ll> A(N), B(M);
rep(i, 0, N) cin >> A[i];
rep(i,0 , M) cin >> B[i];
sort(all(A));
sort(all(B));
ll cnt = 0;
rep(i, 0, N) {
ll key = C / A[i];
ll ind = upper_bound(all(B), key) - B.begin();
cnt += M - ind;
}
cout << fixed << setprecision(15) << (double)cnt / (double)(N * M) << '\n';
}