結果
問題 |
No.450 ベー君のシャトルラン
|
ユーザー |
![]() |
提出日時 | 2016-12-01 00:16:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 737 ms |
コンパイル使用メモリ | 58,488 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-27 14:23:53 |
合計ジャッジ時間 | 7,520 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 TLE * 2 |
ソースコード
#include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <cstdio> using namespace std; int main(int argc, char *argv[]) { cout.precision(10); long double vl, vr, d, w, ans = 0; cin >> vl >> vr >> d >> w; while (d > 1.0e-11) { long double a = (d * w) / (w + vr), t = a / w; ans += a; d -= t * (vl + vr); a = (d * w) / (w + vl), t = a / w; ans += a; d -= t * (vl + vr); } cout << ans << endl; return 0; }