CodeForces
来源:互联网 发布:康佳网络电视售后电话 编辑:程序博客网 时间:2024/04/29 20:39
m,s 向下 /5 判断区间的话好像有精度问题一直wa8
只能把h,t1,t2 向上 *5 判断经过的指针的数量, 数量为3或0都OK。
#include <bits/stdc++.h>using namespace std;int a[111];int h,m,s,t1,t2;int main(){ cin >> h >> m >> s >>t1 >> t2; h *= 5; t1 *= 5; t2 *= 5; a[h] ++; a[m] ++; a[s] ++; if(t1 > t2) swap(t1,t2); int k = 0; for(int i = t1 ; i < t2 ;i++) { k+=a[i]; } if(!k || k==3)cout <<"yes" << endl; else cout << "NO" <<endl;}
阅读全文
0 0
- codeforces~~~
- Codeforces
- codeforces
- Codeforces
- codeforces
- codeforces
- Codeforces
- Codeforces
- CodeForces
- CodeForces
- CodeForces
- CodeForces
- CodeForces
- Codeforces
- Codeforces
- Codeforces
- Codeforces
- Codeforces
- leetcode 007 Reverse Integer
- 关于持续集成,质量管理,工具等
- 封装函数轮播图多页面使用
- response入门
- TensorFlow 实现一元线性回归模型
- CodeForces
- UI游戏框架(三)
- JAVA 内部类创建及使用
- linux c 运算符 表达式
- Vue2.0 爬坑问题集锦
- 数字货币使用区块链开发技术由浅入深指南
- 爬虫技术
- Linux下matlab打开出现error starting desktop启动桌面时错误
- JAVA提高篇(7)--File类对象及常用操作方法