Codeforces Round #364 (Div. 2) D As Fast As Possible
2017-10-02 20:33
411 查看
参考:http://blog.csdn.net/acm_fighting/article/details/52003538
#include <bits/stdc++.h> using namespace std; int main(){ int n,k; double l,v1,v2; cin >> n >> l >> v1 >> v2 >> k; int g = n/k+int(bool(n%k)); double a=(v1+v2)*l/(v1+v2+2*(g-1)*v1); double out=a/v2+(l-a)/v1; cout << fixed << setprecision(7) << out << endl; return 0; }
相关文章推荐
- Codeforces Round #364 (Div. 1)A. As Fast As Possible(数学)
- 【Codeforces Round 364 (Div 2)D】【二分答案 or 公式推导】As Fast As Possible 小朋友乘校车去远足最短到达时间
- Codeforces Round #364 (Div. 2) D. As Fast As Possible 【二分+贪心+验证】
- Codeforces Round #364 (Div. 1) A - As Fast As Possible
- codeforces 364 div2 D As Fast As Possible
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- Codeforces Round #364 (Div. 1) 题解(待续)
- Codeforces Round #364 (Div. 2) D As Fast As Possible(数学)
- Codeforces Round #364 (Div. 1) B Connecting Universities
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- codeforces round #364 div2 D As Fast As Possible 二分+贪心
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- Codeforces Round #364 (Div. 2)(A,B,C,D)
- Codeforces Round #364 (Div. 2) F. Break Up(割边)
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- 【Codeforces Round 364 (Div 2)A】【水题】Cards
- Codeforces Round #437 (Div. 1) C - Gotta Go Fast
- 【Codeforces Round 364 (Div 2)B】【简单讨论】Cells Not Under Attack 行列炮台覆盖不被攻击格子数