About Grisha N. ( URAL - 2012 )
Problem
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.
Example
| input | output |
|---|---|
7 |
YES |
5 |
NO |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <cmath>
using namespace std;
typedef long long ll;
int main()
{
int n;
while(scanf("%d",&n) != EOF)
{
int m = 12 - n;
m *= 45;
if(m > 240)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
About Grisha N. ( URAL - 2012 )的更多相关文章
- ural 2012 About Grisha N.(水)
2012. About Grisha N. Time limit: 1.0 secondMemory limit: 64 MB Grisha N. told his two teammates tha ...
- DP+路径 URAL 1029 Ministry
题目传送门 /* 题意:就是从上到下,找到最短路,输出路径 DP+路径:状态转移方程:dp[i][j] = min (dp[i-1][j], dp[i][j-1], dp[i][j+1]) + a[[ ...
- Ural 1201 Which Day Is It? 题解
目录 Ural 1201 Which Day Is It? 题解 题意 输入 输出 题解 程序 Ural 1201 Which Day Is It? 题解 题意 打印一个月历. 输入 输入日\((1\ ...
- Windows server 2012 添加中文语言包(英文转为中文)(离线)
Windows server 2012 添加中文语言包(英文转为中文)(离线) 相关资料: 公司环境:亚马孙aws虚拟机 英文版Windows2012 中文SQL Server2012安装包,需要安装 ...
- Windows Server 2012 NIC Teaming介绍及注意事项
Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...
- 1.初始Windows Server 2012 R2 Hyper-V + 系统安装详细
干啥的?现在企业服务器都是分开的,比如图片服务器,数据库服务器,redis服务器等等,或多或少一个网站都会用到多个服务器,而服务器的成本很高,要是动不动采购几十台,公司绝对吃不消的,于是虚拟化技术出来 ...
- 0.Win8.1,Win10,Windows Server 2012 安装 Net Framework 3.5
后期会在博客首发更新:http://dnt.dkill.net 网站部署之~Windows Server | 本地部署:http://www.cnblogs.com/dunitian/p/482280 ...
- windows 2012 r2 can't find kb2919355
问题 解决: 1.手动安装了 Windows8.1-KB2919442-x64 2.手动下载 KB2919355 更新成功 Turns out to have been a result ...
- Windows Server 2012 磁盘管理之 简单卷、跨区卷、带区卷、镜像卷和RAID-5卷
今天给客户配置故障转移群集,在Windows Server 2012 R2的系统上,通过iSCSI连接上DELL的SAN存储后,在磁盘管理里面发现可以新建 简单卷.跨区卷.带区卷.镜像卷.RAID-5 ...
随机推荐
- IDEA忽略不必要提交的文件
1.在idea中安装插件用来生成和管理 .gitignore 文件,安装成功后重启idea 2.新建.gitignore 文件 3.将不需要提交的文件添加到.gitignore 4.删除缓冲文件 . ...
- (六)Hibernate的增删改查操作(3)
一.在Hibernate中使用原生SQL语句 sql语句面向的是数据库,所以sql语句中对应的不再是bean了,比如sql="select * from user" 在hql中 ...
- 关于hashcode 和 equals 的内容总结
第一:equals() 的作用是 表示其他对象是否“等于”这个对象. 在Object源码里面 equals的作用等价于 == 即 用来比较俩个对象的内存地址是否相同 public boole ...
- C#操作DOS命令,并获取处理返回值
// /*---------------- // // 文件名:Method // // 文件功能描述: // // 使用 ADB 来进行安卓设备与PC端之间的文件交互,具体adb命令操作请百度 ...
- JS使用MD5加密
MD5加密JS代码 /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algor ...
- win7 bios引导启动Ubuntu
用easyBCD修改系统启动项更改 1.安装easyBCD后打开,点击“Add New Entry”>选择Linux/BSD:具体设置如图,Type选择GRUB2,Name自己随便写,笔者写的是 ...
- C#通过地址获取省市区(基于百度地图API)
最近公司有个需求,想通过地址获取对应的省市区,本来想直接通过对地址的截取,对于完整的地址还可以,不完整的就没法用了 所以本篇通过百度地图API来获取地址 第一步:申请ak密钥 登录百度地图开放平台,按 ...
- zlog日志函数库
在C的世界里面没有特别好的日志函数库(就像JAVA里面的的log4j,或者C++的log4cxx).C程序员都喜欢用自己的轮子.printf就是个挺好的轮子,但没办法通过配置改变日志的格式或者输出文件 ...
- golang的序列化与反序列化的几种方式
golang用来序列化的模块有很多,我们来介绍3个. json 首先登场的是json,这个几乎毋庸置疑. 序列化 package main import ( "encoding/json&q ...
- (14)占位符%和format
# 在介绍占位符之前,这里先介绍下索引,索引可以方便的帮我们拿到容器内的数据 # 索引可以简单的理解为一个有序的标记,我们把容器里的元素每一个都编上一个编号 # 凡是有序的容器类型数据,都可以通过索引 ...