結果
問題 | No.379 五円硬貨 |
ユーザー |
![]() |
提出日時 | 2016-06-17 22:44:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 1,307 bytes |
コンパイル時間 | 1,070 ms |
コンパイル使用メモリ | 110,388 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 05:17:18 |
合計ジャッジ時間 | 1,668 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <complex> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <iomanip> #include <assert.h> #include <array> #include <cstdio> #include <cstring> #include <random> #include <functional> #include <numeric> #include <bitset> #include <fstream> using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(), (c).end() #define zero(a) memset(a, 0, sizeof a) #define minus(a) memset(a, -1, sizeof a) #define watch(a) { cout << #a << " = " << a << endl; } template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); } template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); } typedef long long ll; int const inf = 1<<29; int main() { ll N, G, V; cin >> N >> G >> V; /* double L = 0.0, R = 1e9; rep(_, 150) { double Ml = (2 * L + R) / 3.0; double Mr = (L + 2 * R) / 3.0; //N / 5 * G / V if(abs(Ml * V * 5 - N * G) <= abs(Mr * V * 5 - N * G)) { R = Mr; } else { L = Ml; } } */ printf("%.20f\n", (double)(N / 5) * G / V); // printf("%.15f\n", (L + R) / 2.0); return 0; }