結果
問題 |
No.1993 Horse Racing
|
ユーザー |
![]() |
提出日時 | 2022-08-20 15:17:54 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 526 bytes |
コンパイル時間 | 1,265 ms |
コンパイル使用メモリ | 108,728 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 07:59:26 |
合計ジャッジ時間 | 2,312 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
#include <iostream> #include<utility> #include <vector> #include <map> #include<string> #include<queue> #include<math.h> #define pb push_back #define all(x) begin(x),end(x) #define ll long long #define P pair<int,int> #define lP pait<ll,ll> using namespace std; int main() { int n; cin>>n; vector<double> a(n),dp(n); for(int i=0;i<n-1;i++){ cin>>a[i]; } dp[0]=1000; for(int i=0;i<n-1;i++){ dp[i+1]=dp[i]*(1000-a[i])/1000; } printf("%.20lf\n",1000-dp[n-1]); return 0; }