結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2021-05-18 04:56:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 787 bytes |
コンパイル時間 | 4,338 ms |
コンパイル使用メモリ | 343,032 KB |
実行使用メモリ | 13,768 KB |
最終ジャッジ日時 | 2024-10-07 20:13:43 |
合計ジャッジ時間 | 8,787 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 TLE * 1 -- * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <boost/multiprecision/cpp_int.hpp> typedef boost::multiprecision::cpp_int mp; int main(){ int N,M; long long C; cin>>N>>M>>C; vector<long long> 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(A.begin(),A.end()); sort(B.begin(),B.end()); long long ans=0; for(int i=0;i<N;i++){ cerr<<A[i]<<endl; int l=-1,r=M; while(r-l>1){ cerr<<l<<' '<<r<<endl; int m=(l+r)/2; cerr<<B[m]<<endl; if(C<B[m]*A[i]){ r=m; }else{ l=m; } } ans+=M-r; } cout<<((double)ans/(double)N/(double)M)<<endl; }