CodeForces 148BEscape(数学)
来源:互联网 发布:淘宝上的宝贝怎么上架 编辑:程序博客网 时间:2024/06/05 23:02
#include<iostream>#include<cstdio>#include<algorithm>#include<cstdlib>using namespace std;typedef long long ll;ll ans[120];#define sp system("pause");int main(){double vd, vp, t, f, c;cin >> vp >> vd >> t >> f >> c;if (vp >= vd){cout << 0 << endl;return 0;}double pos = t * vp;int st = 0;while (pos < c){pos += pos / (vd - vp) * vp;//cout << "in\n";//cout << pos << endl;if (pos >= c)break;st++;double tim = pos / vd;pos += (tim + f) * vp;//pos += pos / (vd - vp) * vp;}cout << st << endl;return 0;}
0 0
- CodeForces 148BEscape(数学)
- CodeForces 148BEscape
- 【codeforces】数学
- 【codeforces】数学
- Codeforces 385C 数学
- codeforces 603B (数学)
- Codeforces 639C (数学)
- codeforces 698F 数学
- codeforces 730E (数学)
- codeforces 733E (数学)
- codeforces 734F (数学)
- codeforces 766C 数学
- Codeforces 785D 数学
- *【codeforces】数学期望
- codeforces 798C 数学
- Codeforces 805A(数学)
- 【数学思维】CodeForces
- 【组合数学思维】CodeForces
- 蓝桥杯常用算法知识点:【递归】m个A与n个B的全排列个数
- Codeforces Round #334 (Div. 2) B C D
- hdu ACMSteps 5.3.8 Rotate
- 三色排序(荷兰国旗问题)
- Dijkstra单源最短路径
- CodeForces 148BEscape(数学)
- scrollview的相关问题
- java7新特性之Diamond syntax
- 蓝桥杯 算法训练 大小写转换
- Wu-Manber字符串多模式匹配
- poj3928 Ping pong 树状数组
- 第一章“写给-1到3岁的产品经理”读后感
- 冒泡排序思想解析及其实现(java)(2)
- IM同步服务