CodeForces 667A Pouring Rain】的更多相关文章

A. Pouring Rain time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A lot of people in Berland hates rain, but you do not. Rain pacifies, puts your thoughts in order. By these years you have de…
题目链接: A. Pouring Rain time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A lot of people in Berland hates rain, but you do not. Rain pacifies, puts your thoughts in order. By these years you h…
题目链接:http://codeforces.com/contest/667/problem/A 题意:一个杯子里有水,一个人在喝并且同时在往里倒.问这个人能不能喝完,多久能喝完. 把相关变量都量化成高度来做简单. /* ┓┏┓┏┓┃キリキリ♂ mind! ┛┗┛┗┛┃\○/ ┓┏┓┏┓┃ / ┛┗┛┗┛┃ノ) ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┃┃┃┃┃┃ ┻┻┻┻┻┻ */ #include <algorithm> #incl…
一.题目链接:http://codeforces.com/contest/988/problem/F 二.题面 三.思路 很明显而且比较能想到的$dp$. 四.代码实现 #include<bits/stdc++.h> using namespace std; #define fst first #define snd second #define MAXN 2018 typedef pair<int, int> PII; typedef long long LL; int dest…
Rain and Umbrellas 题意:某同学从x=0的点走到x=a的点,路上有几段路程是下雨的, 如果他需要经过这几段下雨的路程, 需要手上有伞, 每一把伞有一个重量, 求走到重点重量×路程的最小花费. 题解:暴力,如果某段路程需要带伞,就直接去找前面有伞的地点,如果不需要伞就直接往后走就好了. 代码: #include<bits/stdc++.h> using namespace std; const int N = 1e5; const int INF = 0x3f3f3f3f; i…
Content 一个水桶直径为 \(d\) 厘米,初始时水面高度为 \(h\) 厘米.你每秒钟喝 \(v\) 毫升水,而由于下雨,水桶里面的水在不喝水的时候每秒会上升 \(e\) 厘米.求你最少需要多少秒才能喝完水桶里面的水,或者你喝水的速度赶不上水桶里面的水增多的速度. 数据范围:\(1\leqslant d,h,v,e\leqslant 10^4\). Solution 我们都知道,圆柱的底面积 \(S=\pi r^2=\pi(\dfrac{d}{2})^2=\dfrac{\pi d^2}{…
终于又回到熟悉的Round了 数学 A - Pouring Rain 设个未知数,解方程,还好没有hack点 #include <bits/stdc++.h> typedef long long ll; const int N = 1e5 + 5; const double PI = acos (-1.0); int main() { double d, h, v, e; scanf ("%lf%lf%lf%lf", &d, &h, &v, &…
拖了一周才完成的题解,抛出一个可爱的表情 (っ'-')╮ =͟͟͞͞❤️.对我来说E.F比较难,都是线段树的题,有点久没写了. A - Infinite Sequence CodeForces - 675A 公差为c,首项为a的等差数列是否有一项等于b. 注意c为0的情况. #include<cstdio> long long a,b,c; int main() { scanf("%lld%lld%lld",&a,&b,&c); if(c==0&am…
In this lesson you will learn to give instructions. 这节课你将将学会给出指示. 课上内容(Lesson) 词汇(Key Word ) bell pepper  灯笼椒   # bell n. 铃,钟:钟声,铃声:钟状物 soy sauce  酱油 vinegar   n.醋 chili  n. 红辣椒,辣椒 onion n.洋葱    #   green onion 葱花,叶用葱 garlic n.大蒜 ginger n.姜 ring bell…
美国当地时间2018日11月8日,著名科幻作家刘慈欣被授予2018年度克拉克想象力贡献社会奖(Clarke Award for Imagination in Service to Society),表彰其在科幻小说创作领域做出的贡献. 据了解,这是继2015年凭借<三体>获荣获雨果奖最佳长篇小说奖后,刘慈欣再一次获得科幻国际大奖. 获奖感言双语全文: 先生们.女士们,晚上好, Ladies and Gentleman, Good evening! 很荣幸获得克拉克想象力服务社会奖. It's…