結果
問題 | No.236 鴛鴦茶 |
ユーザー |
![]() |
提出日時 | 2017-01-03 00:19:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 674 bytes |
コンパイル時間 | 606 ms |
コンパイル使用メモリ | 73,976 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 13:09:51 |
合計ジャッジ時間 | 1,426 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <iomanip> using namespace std; template<typename STL> inline void print_STL(STL c, string ab = ""){ cout << ab << '\n'; for(auto t : c) cout << t << ' '; cout << '\n';} template<typename VEC> inline void import_VEC(VEC& c, int n){ typename VEC::value_type tmp; for(int i = 0; i < n; ++i){ cin >> tmp; c.push_back(tmp);} } #define SPRE(x) setprecision(x) // 精度を指定 int main() { cin.tie(0); ios::sync_with_stdio(false); int a, b, x, y; cin >> a >> b >> x >> y; double xb = x * b; double ya = y * a; cout << SPRE(10) << scientific << (xb < ya ? x + xb/a : y + ya/b) << '\n'; }