結果

問題 No.236 鴛鴦茶
ユーザー yukiteru
提出日時 2018-02-05 18:11:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 666 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 80,904 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 13:14:24
合計ジャッジ時間 1,519 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>
#include<list>
#include<bitset>
#include<functional>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000
#define PI 3.14159265358979

using namespace std;
typedef pair<int, int> P;

int main(void) {
	double a, b, x, y;
	double p, q;

	cin >> a >> b >> x >> y;
	p = x / a;
	q = y / b;
	if (p < q) {
		printf("%.10lf\n", (a + b) / a*x);
	}
	else {
		printf("%.10lf\n", (a + b) / b*y);
	}


	return 0;
}
0