結果
問題 |
No.210 探し物はどこですか?
|
ユーザー |
|
提出日時 | 2020-03-11 06:33:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 616 ms / 2,000 ms |
コード長 | 479 bytes |
コンパイル時間 | 977 ms |
コンパイル使用メモリ | 81,856 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 23:58:58 |
合計ジャッジ時間 | 24,029 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 8 | main() | ^~~~
ソースコード
#include<iostream> #include<queue> #include<iomanip> using namespace std; int N; int p[1000],q[1000]; double ans; main() { cin>>N; for(int i=0;i<N;i++)cin>>p[i]; for(int i=0;i<N;i++)cin>>q[i]; priority_queue<pair<double,double> >P; for(int i=0;i<N;i++) { P.push(make_pair(p[i]*q[i]/1e5,q[i]/1e2)); } for(int i=1;i<=4e6;i++) { pair<double,double>a=P.top();P.pop(); ans+=i*a.first; a.first*=1-a.second; P.push(a); } cout<<fixed<<setprecision(16)<<ans<<endl; }