結果

問題 No.236 鴛鴦茶
ユーザー Bwambocos
提出日時 2017-03-28 14:22:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 744 bytes
コンパイル時間 790 ms
コンパイル使用メモリ 94,584 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 13:21:24
合計ジャッジ時間 1,666 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <map>
#include <set>
#include <array>
#include <queue>
#include <string>
#include <vector>
#include <numeric>
#include <algorithm>
#include <functional>
#define MOD 1000000007
#define INF 11234567890
#define in std::cin
#define out std::cout
#define rep(i,N) for(LL i=0;i<N;++i)
typedef long long int LL;
typedef std::pair<int, int> P;

double A, B, X, Y;

int main()
{
	in >> A >> B >> X >> Y;

	out << std::fixed << std::setprecision(10);
	if (A == B)
	{
		out << std::min(X, Y) * 2 << std::endl;
	}
	else if (A > B)
	{
		out << X / A*(A + B) << std::endl;
	}
	else
	{
		out << Y / B*(A + B) << std::endl;
	}
	return 0;
}
0