ural 2012 About Grisha N.(水)
2024-10-16 21:38:51
2012. About Grisha N.
Time limit: 1.0 second
Memory limit: 64 MB
Memory limit: 64 MB
Grisha N. told his two teammates that he was going to solve all given problems at the subregional contest, even if the teammates wouldn’t show up at the competition. The teammates didn’t believe Grisha so he told them the plan how he was going to do this.
During the first hour he wants to solve f problems. If there is still some time left to the end of the first hour, Grisha will simply walk along the hall. Beginning from the second hour Grisha wants to spend exactly 45 minutes on each of the problems left. If the plan is a success, will Grisha be able to solve all 12 given problems for 5 hours?
Input
The only line contains an integer f that is the number of problems Grisha wants to solve during the first hour of the competition (1 ≤ f ≤ 11).
Output
Output “YES”, if Grisha manages to solve all the given problems alone, and “NO” if he doesn’t.
Samples
input | output |
---|---|
7 |
YES |
5 |
NO |
Problem Author: Alexander Ipatov (prepared by Olga Soboleva)
Problem Source: NEERC 2014, Eastern subregional contest
Problem Source: NEERC 2014, Eastern subregional contest
Difficulty: 20 Printable version Submit solution Discussion (5)
All submissions (11903) All accepted submissions (6914) Solutions rating (5478)
All submissions (11903) All accepted submissions (6914) Solutions rating (5478)
#include <bits/stdc++.h>
using namespace std; int main()
{
int f;
int tm = * ;
int tm2;
while (~scanf("%d", &f)) {
tm2 = * ( - f);
if (tm2 <= tm) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return ;
}
最新文章
- HTML 学习笔记 JQuery(DOM 操作)
- C++笔记(一)
- [issue] [iOS 10] 升级后无法真机测试 Could not find Developer Disk Image
- Hoj2634 How to earn more?
- 获取Assets目录下的图片并显示
- iOS 关于webView的使用方法
- C#.NET实现Word或Excel文件转为HTML文件
- haslayout引起的IE6 :hover失效
- (诊断)为GitHub添加SSH key时出现“Could not open a connection to your authentication agent”错误的应对方案(转)
- datables的基本操作
- Arduino-函数库和程序架构介绍
- 【NLP】依存句法关系符号解释
- 深入理解.sync修饰符
- Linux下Apache网站目录读写权限的设置
- python-day7-字符串类型的内置方法
- JS实现表单多文件上传样式美化支持选中文件后删除相关项
- net 编译报错:编辑器或项目正在尝试签出在内存中修改的文件,这将导致保存该文件
- springmvc+mybatis 处理时间
- 简析 Tomcat 、Nginx 与 Apache 的区别
- 移动端h5开发相关内容总结css篇--笔记