結果
| 問題 |
No.1280 Beyond C
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-24 21:06:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 611 bytes |
| コンパイル時間 | 2,388 ms |
| コンパイル使用メモリ | 198,600 KB |
| 最終ジャッジ日時 | 2025-01-16 05:30:18 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 2 RE * 6 |
ソースコード
#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 < 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';
}