結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2020-11-07 05:23:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 115 ms / 2,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 2,149 ms |
コンパイル使用メモリ | 197,688 KB |
最終ジャッジ日時 | 2025-01-15 21:26:01 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long N, M, C; cin >> N >> M >> C; vector<int> A(N), B(M); for (int i = 0; i < N; i++) cin >> A.at(i); for (int i = 0; i < M; i++) cin >> B.at(i); sort(B.begin(), B.end()); long cnt = 0; for (auto a : A) { int tmp = upper_bound(B.begin(), B.end(), (long double)C / a) - B.begin(); cnt += M - tmp; } cout << fixed << setprecision(6) << (long double)cnt / N / M << "\n"; }