結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2021-05-18 08:00:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 616 bytes |
コンパイル時間 | 4,318 ms |
コンパイル使用メモリ | 343,068 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 02:01:14 |
合計ジャッジ時間 | 5,551 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#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(b>=0 && A[a]*B[b]>C){ --b; }else{ ans+=M-b-1; ++a; } } cout<<(double)ans/(double)M/(double)N<<endl; }