結果

問題 No.1280 Beyond C
ユーザー kyo1
提出日時 2020-11-13 18:13:20
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 510 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 198,936 KB
最終ジャッジ日時 2025-01-15 22:23:18
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int64_t N, M, C;
  cin >> N >> M >> C;
  vector<int64_t> A(N), B(M);
  for (auto &&e : A) {
    cin >> e;
  }
  for (auto &&e : B) {
    cin >> e;
  }
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  int64_t x = 0;
  for (int64_t a : A) {
    x += B.end() - upper_bound(B.begin(), B.end(), C / a);
  }
  cout << fixed << setprecision(10) << (long double)x / N / M << '\n';
  return 0;
}
0