結果
| 問題 |
No.1280 Beyond C
|
| コンテスト | |
| ユーザー |
mamimume____mo
|
| 提出日時 | 2020-11-29 18:13:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 456 bytes |
| コンパイル時間 | 1,788 ms |
| コンパイル使用メモリ | 172,008 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 02:02:27 |
| 合計ジャッジ時間 | 3,834 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N,M,C;
cin >> N >> M >> C;
vector<ll> a(N);
vector<ll> b(M);
for(ll i = 0;i < N;i++)cin >> a[i];
for(ll i = 0;i < M;i++)cin >> b[i];
sort(a.begin(),a.end());
sort(b.begin(),b.end());
ll num = 0;
for(ll i = 0;i < N;i++){
auto p = upper_bound(b.begin(),b.end(),C/a[i]);
num += b.end() - p;
}
double ans = (double)(num)/(N * M);
printf("%.14lf\n",ans);
}
mamimume____mo