結果
問題 | No.1280 Beyond C |
ユーザー |
|
提出日時 | 2020-11-07 23:50:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 600 ms |
コンパイル使用メモリ | 74,980 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 14:56:24 |
合計ジャッジ時間 | 1,984 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#include<iostream> #include<iomanip> #include<algorithm> using namespace std; long N,M,C,A[1<<17],B[1<<17]; main() { cin>>N>>M>>C; for(int i=0;i<N;i++)cin>>A[i]; for(int i=0;i<M;i++)cin>>B[i]; sort(A,A+N); sort(B,B+M); long ans=0; int j=M; for(int i=0;i<N;i++) { while(j>0&&B[j-1]*A[i]>C)j--; ans+=M-j; } cout<<fixed<<setprecision(16)<<ans/(double)N/M<<endl; }