結果

問題 No.450 ベー君のシャトルラン
ユーザー naimonon77naimonon77
提出日時 2016-12-09 20:56:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 904 bytes
コンパイル時間 1,665 ms
コンパイル使用メモリ 163,664 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-19 06:06:21
合計ジャッジ時間 4,606 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
4,384 KB
testcase_01 AC 110 ms
4,380 KB
testcase_02 AC 109 ms
4,376 KB
testcase_03 AC 111 ms
4,376 KB
testcase_04 AC 107 ms
4,380 KB
testcase_05 AC 109 ms
4,380 KB
testcase_06 AC 110 ms
4,376 KB
testcase_07 AC 109 ms
4,380 KB
testcase_08 AC 108 ms
4,384 KB
testcase_09 AC 109 ms
4,380 KB
testcase_10 AC 110 ms
4,380 KB
testcase_11 AC 109 ms
4,380 KB
testcase_12 AC 109 ms
4,380 KB
testcase_13 AC 111 ms
4,376 KB
testcase_14 AC 111 ms
4,376 KB
testcase_15 AC 109 ms
4,380 KB
testcase_16 AC 119 ms
4,380 KB
testcase_17 AC 115 ms
4,376 KB
testcase_18 AC 111 ms
4,380 KB
testcase_19 AC 110 ms
4,380 KB
testcase_20 AC 107 ms
4,376 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define all(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)2e5 + 5;

int main() {
	cout << setprecision(20);
	double v[2];
	double d;
	double w;
	double t = 0;
	cin >> v[0] >> v[1];
	cin >> d >> w;
	rep(loop, 1000000) {
		rep(i, 2) {
			double t_diff = d / (w + v[i]);
			t += t_diff;
			d -= t_diff * (v[0] + v[1]);
		}
	}
	cout << w * t << endl;
	return 0;
}
0