結果
問題 | No.1280 Beyond C |
ユーザー |
|
提出日時 | 2020-11-24 21:05:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 611 bytes |
コンパイル時間 | 3,250 ms |
コンパイル使用メモリ | 197,220 KB |
最終ジャッジ日時 | 2025-01-16 05:30:03 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 8 |
ソースコード
#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(n); for (ll i = 0; i < n; i++) { cin >> a[i]; } for (ll i = 0; i < n; 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'; }