CF868B Race Against Time
思路:
模拟。少写了一个等号FST了,好气啊。
实现:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int h, m, s, t1, t2;
while (cin >> h >> m >> s >> t1 >> t2)
{
int cnt = ;
int x = min(t1, t2), y = max(t1, t2);
if (h >= x && h < y) cnt++;
if (m >= x * && m < y * ) cnt++;
if (s > x * && s < y * ) cnt++;
if (cnt == || cnt == ) puts("YES");
else puts("NO");
}
return ;
}
CF868B Race Against Time的更多相关文章
- Promise.race
[Promise.race] 返回最先完成的promise var p1 = new Promise(function(resolve, reject) { setTimeout(resolve, 5 ...
- golang中的race检测
golang中的race检测 由于golang中的go是非常方便的,加上函数又非常容易隐藏go. 所以很多时候,当我们写出一个程序的时候,我们并不知道这个程序在并发情况下会不会出现什么问题. 所以在本 ...
- 【BZOJ-2599】Race 点分治
2599: [IOI2011]Race Time Limit: 70 Sec Memory Limit: 128 MBSubmit: 2590 Solved: 769[Submit][Status ...
- hdu 4123 Bob’s Race 树的直径+rmq+尺取
Bob’s Race Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Probl ...
- Codeforces Round #131 (Div. 2) E. Relay Race dp
题目链接: http://codeforces.com/problemset/problem/214/E Relay Race time limit per test4 secondsmemory l ...
- 【多线程同步案例】Race Condition引起的性能问题
Race Condition(也叫做资源竞争),是多线程编程中比较头疼的问题.特别是Java多线程模型当中,经常会因为多个线程同时访问相同的共享数据,而造成数据的不一致性.为了解决这个问题,通常来说需 ...
- Codeforces Round #328 (Div. 2) C. The Big Race 数学.lcm
C. The Big Race Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/592/probl ...
- HDU 4123 Bob’s Race 树的直径 RMQ
Bob’s Race Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=41 ...
- [LOJ 1038] Race to 1 Again
C - Race to 1 Again Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu D ...
随机推荐
- 18.10.7 POIN 模拟赛
期望 :80+ +90+40=210+ 实际 :30+90+0=120 链接:https://www.nowcoder.com/acm/contest/175/A来源:牛客网 时间限制:C/C++ 1 ...
- 立面图 平面图 剖面图 CAD
http://www.qinxue.com/88.html http://www.xsteach.com/course/2855 前后左右各个侧面的外部投影图——立面图:对建筑物各个侧面进行投影所得到 ...
- 未能找出类型或命名空间名称“T” 问题的解决方案
在已经引用“using System.Collections.Generic;”时,还是提示急未能找出类型或命名空间名称“T”的问题.
- elk实时日志分析平台部署搭建详细实现过程
原文:http://blog.csdn.net/mchdba/article/details/52132663 1.ELK平台介绍 在搜索ELK资料的时候,发现这篇文章比较好,于是摘抄一小段:以下内容 ...
- 踩坑录- Spring Boot - CORS 跨域 - 浏览器同源策略
1.解决办法,创建一个过滤器,处理所有response响应头 import java.io.IOException; import javax.servlet.Filter; import javax ...
- Linux Centos7 Apache 訪问 You don't have permission to access / on this server.
折腾了非常久,今天才找到了最正确的答案.感言真不easy. 百度出来的99%都是採集的内容.全都是错误的. You don't have permission to access / on this ...
- CentOS+Apache+php无法访问redis的解决方法 Redis server went away
在CentOS下配置Apache+php+redis+phpredis环境.编辑访问redis缓存的php程序test.php,以应用程序方式在后台运行,可成功访问Redis,而在Apache下以网页 ...
- Java中的字节输入出流和字符输入输出流
Java中的字节输入出流和字符输入输出流 以下哪个流类属于面向字符的输入流( ) A BufferedWriter B FileInputStream C ObjectInputStream D In ...
- Codeforces Round #362 (Div. 2) D. Puzzles
D. Puzzles time limit per test 1 second memory limit per test 256 megabytes input standard input out ...
- 并不对劲的[Noi2008]道路设计
Time Limit: 20 Sec Memory Limit: 162 MB Submit: 931 Solved: 509 [Submit][Status][Discuss] Descriptio ...