結果

問題 No.1280 Beyond C
ユーザー ninoinui
提出日時 2020-11-07 05:21:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 1,857 ms
コンパイル使用メモリ 197,836 KB
最終ジャッジ日時 2025-01-15 21:25:40
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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(), (double)C / a) - B.begin();
    cnt += M - tmp;
  }
  cout << fixed << setprecision(6) << (double)cnt / N / M << "\n";
}
0