結果
問題 |
No.453 製薬会社
|
ユーザー |
|
提出日時 | 2019-02-24 11:14:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 508 bytes |
コンパイル時間 | 790 ms |
コンパイル使用メモリ | 69,864 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-21 08:32:00 |
合計ジャッジ時間 | 1,628 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 WA * 3 |
ソースコード
#include<iostream> #include<iomanip> using namespace std; // 実行可能領域の頂点だけ調べればよい? int main(){ double c, d; cin >> c >> d; auto f = [=](double x, double y)->double{ return 1000*x + 2000*y; }; double ans = (f(0, min(7*d/5, 7*c/2)), f(min(4*c/3, 4*d), 0)); double a = (20*c-8*d)/13, b = (21*d-7*c)/13; if(a > 0 && b > 0) ans = max(ans, f((20*c-8*d)/13, (21*d-7*c)/13)); cout << fixed << setprecision(12) << ans << endl; return 0; }