結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2024-04-04 12:15:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 198,432 KB |
最終ジャッジ日時 | 2025-02-20 20:02:17 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, M, C, ans=0; cin >> N >> M >> C; vector<ll> a(N), b(M); for (int i=0; i<N; i++) cin >> a[i]; for (int j=0; j<M; j++) cin >> b[j]; sort(b.begin(), b.end()); for (int i=0; i<N; i++){ //a*b<=c //b<=c/a ans += upper_bound(b.begin(), b.end(), C/a[i])-b.begin(); } cout << setprecision(18) << 1.0l-(long double)(ans)/(long double)(N*M) << endl; return 0; }