結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
cgy4ever
|
| 提出日時 | 2016-08-22 08:01:13 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 565 bytes |
| コンパイル時間 | 1,674 ms |
| コンパイル使用メモリ | 166,032 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 13:07:54 |
| 合計ジャッジ時間 | 2,539 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int MAIN()
{
double a, b, c, d;
cin >> a >> b >> c >> d;
c = min(c, d / b * a);
d = min(d, c / a * b);
c = min(c, d / b * a);
d = min(d, c / a * b);
cout << (c + d) << endl;
return 0;
}
int main()
{
int start = clock();
#ifdef LOCAL_TEST
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
ios :: sync_with_stdio(false);
cout << fixed << setprecision(16);
int ret = MAIN();
#ifdef LOCAL_TEST
cout << "[Finished in " << clock() - start << " ms]" << endl;
#endif
return ret;
}
cgy4ever