题目链接:https://codeforces.com/contest/29/problem/B

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <climits>
#include <cstring>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
typedef double db;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
static const int INF=0x3f3f3f3f;
static const ll INFL=0x3f3f3f3f3f3f3f3f;
static const db EPS=1e-10;
static const db PI=acos(-1.0);
inline int read()
{int X=0; bool flag=1; char ch=getchar();while(ch<'0'||ch>'9') {if(ch=='-') flag=0; ch=getchar();}while(ch>='0'&&ch<='9') {X=(X<<1)+(X<<3)+ch-'0'; ch=getchar();}if(flag) return X;return ~(X-1);
}
inline void write(int X)
{if(X<0) {X=~(X-1); putchar('-');}if(X>9) write(X/10);putchar(X%10+'0');
}
int l,d,v,g,r;
int main()
{scanf("%d%d%d%d%d",&l,&d,&v,&g,&r);if(d%(v*(g+r))<g*v) printf("%.12lf\n",1.0*l/v);else printf("%.12lf\n",1.0*l/v+1.0*(v*(g+r)-d%(v*(g+r)))/v);return 0;
}

CodeForces - 29B Traffic Lights【水题】相关推荐

  1. codeforces 1060a(思维水题)

    Let's call a string a phone number if it has length 11 and fits the pattern "8xxxxxxxxxx", ...

  2. Codeforces Gym 100286I iSharp 水题

    Problem I. iSharp Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest ...

  3. CodeForces - 1287B Hyperset(暴力水题)

    题目链接:点击查看 题目大意:给出"集合"的定义: 集合中必须有三个元素 每个元素的每个特征值必须全部相同或者全部不同,不能存在两者相同但与第三者不同 现在给出n个元素以及m个特征 ...

  4. CodeForces 931C Laboratory Work 水题,构造

    *这种题好像不用写题解... 题意: 一个人要改动别人的实验记录,实验记录记录是一个集合 实验记录本身满足:$max(X)-min(X)<=2$ 改动结果要求: 1.新的集合平均值和之前的一样 ...

  5. 【CodeForces - 1066A~E】水题,模拟(有技巧),思维,题意难懂的模拟,二进制问题(有技巧)

    A. 题目大意: x坐标上1~L有L个点都是整数,每v个长度就有一个灯亮着,但是有 [ l , r ] 这段区间上有列火车挡住了,问你能看到多少亮灯. 解题报告: 大水题啊,找几个样例就会发现需要特殊 ...

  6. CodeForces - 13A Numbers【水题】

    题目链接:https://codeforces.com/contest/13/problem/A 暴力 #include <iostream> using namespace std; i ...

  7. Educational Codeforces Round 30 A[水题/数组排序]

    A. Chores time limit per test 2 seconds memory limit per test 256 megabytes input standard input out ...

  8. CodeForces - 1042C (emmmmmm水题)

    You are given an array aa consisting of nn integers. You can perform the following operations with i ...

  9. CodeForces刷题C语言:Next Test、Spit Problem、Traffic Lights、Reconnaissance、Borze

    记录洛谷刷题C语言 一.Next Test 题面翻译 题面描述 给出 nnn 个互不相同的整数 aia_iai​ ,从小到大找第一个没有出现过的整数. 输入格式 第一行一个正整数 nnn ,之后是 n ...

最新文章

  1. 2022-2028年中国塑料导爆管行业市场调查研究及前瞻分析报告
  2. 程序员之路──如何学习C语言并精通C语言
  3. 【2019暑假刷题笔记-图的存储和图的遍历】绪论(代码模板-总结自《算法笔记》)
  4. 旧版 npm 安装 node_modules 模块目录层次过深,导致 win 下无法删除
  5. C++ class实现邻接表存储的图(完整代码)
  6. 一个函数统一238个机器学习R包,这也太赞了吧
  7. 用Python手写五大经典排序算法,看完这篇终于懂了!
  8. (10)FPGA顶层通用模块(学无止境)
  9. 从卓越工程的角度看微软中国开发团队的成长 (一)
  10. JSK-58 合法回文【字符串】
  11. Symfony2Book16:Symfony2内部03-事件调度
  12. 正则表达式-国际手机号或座机号校验
  13. unity帧动画事件多次播放
  14. 历史总是在重演,AI寒冬或再来
  15. python第三方库matplotlib绘制简单折线图
  16. 完美的word转pdf
  17. IE中直接访问html,????? help!在IE中用Applet如何访问所在的HTML吗?
  18. 大数据行业薪资有多少 如何去学习大数据开发
  19. jmeter下载及安装配置
  20. 微信小程序调用局域网服务器,微信小程序中使用mdns api扫描局域网内的打印机...

热门文章

  1. Python 匿名函数lambda 相关的一个小题
  2. 好学生勤做笔记一生为学,熊掌记、Ulysses、Effie,选哪款?
  3. 盘古开源:推动大数据产业发展,运营商如何创造数字经济新价值?
  4. 五、同步计数器及源码
  5. Tomcat 启动远程调试,访问不到8000调试端口
  6. springboot+vue汽车4S店维修管理系统
  7. somebot机械臂安装说明书-v0.4
  8. 关于有道云笔记中脑图展示问题的研究
  9. 自己电脑上装的一些辅助软件
  10. 手把手教你 centos 7 安装RabbitMQ