結果
| 問題 | No.1280 Beyond C |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-08 20:52:49 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 720 bytes |
| 記録 | |
| コンパイル時間 | 607 ms |
| コンパイル使用メモリ | 103,956 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-15 01:36:16 |
| 合計ジャッジ時間 | 1,744 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}