結果
問題 | No.1280 Beyond C |
ユーザー |
![]() |
提出日時 | 2021-05-18 07:57:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 608 bytes |
コンパイル時間 | 5,390 ms |
コンパイル使用メモリ | 342,664 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 01:56:49 |
合計ジャッジ時間 | 5,081 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 5 |
ソースコード
#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; int a=0,b=M-1; while(a<N){ if(A[a]*B[b]>C){ --b; }else{ ans+=M-b-1; ++a; } } cout<<(double)ans/(double)M/(double)N<<endl; }