結果
| 問題 |
No.450 ベー君のシャトルラン
|
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-12-11 02:19:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 606 ms |
| コンパイル使用メモリ | 67,920 KB |
| 実行使用メモリ | 13,764 KB |
| 最終ジャッジ日時 | 2024-11-29 02:22:56 |
| 合計ジャッジ時間 | 7,553 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 TLE * 2 |
ソースコード
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#define wr (w+vr)
#define wl (w+vl)
using namespace std;
int main(void){
double vl,vr,d,w;
double res=0.0,t;
scanf("%lf %lf %lf %lf",&vl,&vr,&d,&w);
bool r=true;
while(d>0.000001){
if(r) t=d/wr;
else t=d/wl;
res+=w*t;
d-=(vr+vl)*t;
}
printf("%.10f\n",res);
return 0;
}
butter_roll