結果
問題 |
No.210 探し物はどこですか?
|
ユーザー |
|
提出日時 | 2020-03-11 06:32:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 482 bytes |
コンパイル時間 | 943 ms |
コンパイル使用メモリ | 81,760 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 23:58:33 |
合計ジャッジ時間 | 2,896 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 12 |
コンパイルメッセージ
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<=100000;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; }