結果
| 問題 |
No.1280 Beyond C
|
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2021-03-13 01:14:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 546 bytes |
| コンパイル時間 | 1,643 ms |
| コンパイル使用メモリ | 172,136 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-14 15:01:59 |
| 合計ジャッジ時間 | 3,909 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
long long C;
cin >> N >> M >> C;
vector<int>a(N),b(M);
for(int i = 0; i < N; i++) {
cin >> a[i];
}
for(int i = 0; i < M; i++) {
cin >> b[i];
}
sort(b.begin(),b.end());
long long cnt = 0;
for(int i = 0; i < N; i++) {
long long tmp = C/a[i]+1;
int it = lower_bound(b.begin(),b.end(),tmp)-b.begin();
cnt += M-it;
}
cout << fixed << setprecision(18) << (long double)(cnt)/(N*M) << endl;
}
ぷら