結果
| 問題 | 
                            No.1280 Beyond C
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-11-24 21:06:27 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 611 bytes | 
| コンパイル時間 | 3,976 ms | 
| コンパイル使用メモリ | 197,880 KB | 
| 最終ジャッジ日時 | 2025-01-16 05:30:29 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 13 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ll n, m, c;
  cin >> n >> m >> c;
  vector<ll> a(n), b(m);
  for (ll i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (ll i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(begin(a), end(a));
  sort(begin(b), end(b));
  ll pos = n - 1, cnt = 0;
  for (ll i = 0; i < n; i++) {
    while (pos >= 0) {
      if (a[i] * b[pos] <= c) {
        break;
      } else {
        pos--;
      }
    }
    cnt += n - 1 - pos;
  }
  cout << setprecision(10);
  cout << (double)cnt / (n * m) << '\n';
}