codeforces A. In Search of an Easy Problem
1 second
256 megabytes
standard input
standard output
When preparing a tournament, Codeforces coordinators try treir best to make the first problem as easy as possible. This time the coordinator had chosen some problem and asked nn people about their opinions. Each person answered whether this problem is easy or hard.
If at least one of these nn people has answered that the problem is hard, the coordinator decides to change the problem. For the given responses, check if the problem is easy enough.
The first line contains a single integer nn (1≤n≤1001≤n≤100) — the number of people who were asked to give their opinions.
The second line contains nn integers, each integer is either 00 or 11. If ii-th integer is 00, then ii-th person thinks that the problem is easy; if it is 11, then ii-th person thinks that the problem is hard.
Print one word: "EASY" if the problem is easy according to all responses, or "HARD" if there is at least one person who thinks the problem is hard.
You may print every letter in any register: "EASY", "easy", "EaSY" and "eAsY" all will be processed correctly.
3
0 0 1
HARD
1
0
EASY 为了熟悉CF。忍了。。
#include<iostream>
#include<cstdlib>
using namespace std; int main(){
int n;
char* hard= "HARD";
char* easy= "EASY";
cin>>n;
for(int i=;i<n;i++){
int c;
cin>>c;
if(c==){
cout<<hard;
exit();
}
}
cout<<easy;
return ;
}
codeforces A. In Search of an Easy Problem的更多相关文章
- CodeForces - 1058A. In Search of an Easy Problem
这题,全零是esay有1是hard,真难呀. #include<bits/stdc++.h> using namespace std; int main(){ int n,i,x,flag ...
- 2018.09.23 codeforces 1053A. In Search of an Easy Problem(gcd)
传送门 今天的签到题. 有一个很显然的结论,gcd(n∗m,k)≤2gcd(n*m,k)\le 2gcd(n∗m,k)≤2. 本蒟蒻是用的行列式求三角形面积证明的. 如果满足这个条件,就可以直接构造出 ...
- CF1030A 【In Search of an Easy Problem】
题目巨简单,主要是给大家翻译一下 给n个数,其中存在1就输出HARD,否则输出EASY,不区分大小写 #include<iostream> #include<cstdio> u ...
- buaa 1033 Easy Problem(三分)(简单)
Easy Problem 时间限制:1000 ms | 内存限制:65536 KB 描写叙述 In this problem, you're to calculate the distance b ...
- CF 1096D Easy Problem [动态规划]
题目链接:http://codeforces.com/problemset/problem/1096/D 题意: 有一长度为n的字符串,每一字符都有一个权值,要求现在从中取出若干个字符,使得字符串中没 ...
- UVA-11991 Easy Problem from Rujia Liu?
Problem E Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for ...
- An easy problem
An easy problem Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Sub ...
- UVa 11991:Easy Problem from Rujia Liu?(STL练习,map+vector)
Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for example, ...
- POJ 2826 An Easy Problem?!
An Easy Problem?! Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7837 Accepted: 1145 ...
随机推荐
- jflash合并两个文件
有时候需要将两个代码块烧写进入单片机的flash,可以使用合并的方法将两个文件合并为一个文件进行烧写,也可以分两次烧写,但要注意不要擦写不相关的存储空间. 打开J-FLASH,新建一个工程,然后fil ...
- LeetCode(117) Populating Next Right Pointers in Each Node II
题目 Follow up for problem "Populating Next Right Pointers in Each Node". What if the given ...
- python基础学习笔记——网络编程(协议篇)
一 互联网的本质 咱们先不说互联网是如何通信的(发送数据,文件等),先用一个经典的例子,给大家说明什么是互联网通信. 现在追溯到八九十年代,当时电话刚刚兴起,还没有手机的概念,只是有线电话,那么此时你 ...
- dedecms 建站相关问题
1.栏目新建文章提示:模板文件不存在,无法解析文档! 解决方法:把模板文件使用".html"的格式 /include/arc.archives.class.php 556行 if ...
- selenium - Js处理滚动条操作
# 11.Js处理滚动条操作 driver.execute_script('arguments[0].scrollIntoView();',target) target 为find_element_b ...
- Mysql 安装及MySQL-python 问题
今天遇到了个低级问题: EnvironmentError:mysql_config not found 网上谷歌了一圈发现没用,静下来想的时候才发现新电脑没安装Mysql,吐血 后面再去官网上下载My ...
- python-高级编程-01
[1] 列表推导 问题 我们需要一个[2,4,6,8] 这样的列表 传统写法 res = [] for i in range(10): if i %2 == 0:res.append(i) print ...
- 运行Android程序出错:The connection to adb is down, and a severe error has occured
调试Android程序时候,报错如下: [2013-02-21 15:41:06 - MainActivity] ------------------------------[2013-02-21 1 ...
- Uiautomator ---(1) 封装代码
http://www.cnblogs.com/by-dream/p/4996000.html 上面是别人的写法 我自己的写法: package qq.test; import android.con ...
- Chromo开发常用插件和***工具
地址:https://www.google.com/chrome/webstore/ ***工具:链接:http://pan.baidu.com/s/1pLakW7T 密码:2gpw Axure RP ...