結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2020-05-18 19:11:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 817 bytes |
コンパイル時間 | 804 ms |
コンパイル使用メモリ | 81,280 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 06:10:50 |
合計ジャッジ時間 | 2,428 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 WA * 1 |
ソースコード
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cassert> #define rep(i,n) for(int i=0; i<(int)(n); i++) using namespace std; using LL = long long; const int Max_Num=1e5; const LL Max_C=1e18; const int Max_AB=1e9; int main(){ LL N, M; double C; cin >> N >> M >> C; assert(N>=1 && N<=Max_Num); assert(M>=1 && M<=Max_Num); assert(C>=1 && C<=Max_C); vector<LL> A(N), B(M); rep(i,N){ LL a; cin >> a; assert(a>=1 && a<=Max_AB); A[i]=a; } rep(i,M){ LL b; cin >> b; assert(b>=1 && b<=Max_AB); B[i]=b; } sort(B.begin(),B.end()); double ans=0; rep(i,N){ double a=A[i]; int num=upper_bound(B.begin(),B.end(),C/a)-B.begin(); ans+=B.size()-num; } cout << setprecision(10) << ans/(N*M) << endl; return 0; }