結果
問題 |
No.1993 Horse Racing
|
ユーザー |
![]() |
提出日時 | 2022-07-02 18:14:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 500 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 41,796 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 13:39:35 |
合計ジャッジ時間 | 1,201 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
/* -*- coding: utf-8 -*- * * 1993.cc: No.1993 Horse Racing - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ const int MAX_N = 100; const int L = 1000; /* typedef */ /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", as + i); double x = L; for (int i = 0; i < n; i++) x *= (double)(L - as[i]) / L; printf("%.12lf\n", L - x); return 0; }