結果
問題 | No.1280 Beyond C |
ユーザー |
![]() |
提出日時 | 2020-11-24 16:56:09 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 898 bytes |
コンパイル時間 | 3,863 ms |
コンパイル使用メモリ | 161,884 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-23 18:41:31 |
合計ジャッジ時間 | 4,254 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for(int (i) = 0; (i) < (n); (i)++) #define repe(i, n) for(i = 0; i <= (n); i++) #define repr(i, n) for(int (i) = (n); (i) > 0; --(i)) #define repre(i, n) for(int (i) = (n); (i) >= 0; --(i)) using namespace std; using ll = long long; using ull = unsigned long long; using P = pair<int,int>; using Graph = vector<vector<int>>; const int INF = INT32_MAX; const ll MOD = 1e9+7; signed main() { ll n, m, c; cin >> n >> m >> c; vector<ll> a(n,0), b(m,0); rep(i,n)cin >> a[i]; rep(i,m)cin >> b[i]; sort(a.begin(), a.end()); sort(b.begin(), b.end()); ll ans = 0; rep(i,n){ ll low = c / a[i]; low++; auto l = lower_bound(b.begin(), b.end(), low); auto index = distance(b.begin(), l); ans += (m - index); } double as = ans / double(n*m); cout << as << endl; return 0; }