A. In Search of an Easy Problem
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

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.

Input

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.

Output

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.

Examples
input

Copy
3
0 0 1
output

Copy
HARD
input

Copy
1
0
output

Copy
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的更多相关文章

  1. 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 ...

  2. 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. 本蒟蒻是用的行列式求三角形面积证明的. 如果满足这个条件,就可以直接构造出 ...

  3. CF1030A 【In Search of an Easy Problem】

    题目巨简单,主要是给大家翻译一下 给n个数,其中存在1就输出HARD,否则输出EASY,不区分大小写 #include<iostream> #include<cstdio> u ...

  4. buaa 1033 Easy Problem(三分)(简单)

    Easy Problem 时间限制:1000 ms  |  内存限制:65536 KB 描写叙述 In this problem, you're to calculate the distance b ...

  5. CF 1096D Easy Problem [动态规划]

    题目链接:http://codeforces.com/problemset/problem/1096/D 题意: 有一长度为n的字符串,每一字符都有一个权值,要求现在从中取出若干个字符,使得字符串中没 ...

  6. UVA-11991 Easy Problem from Rujia Liu?

    Problem E Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for ...

  7. An easy problem

    An easy problem Time Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Sub ...

  8. 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, ...

  9. POJ 2826 An Easy Problem?!

    An Easy Problem?! Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7837   Accepted: 1145 ...

随机推荐

  1. Python学习笔记:re模块(正则表达式)

    本文是部分内容参考自:http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html,虽然这篇博客是基于Python2.4的老版本,但是基础的P ...

  2. Python入门学习笔记2:刷题

    1) LeetCode 强的面试题和算法题,要求也比较高,很多国内外的码农在上面刷题.难度从easy到hard都有,而且覆盖面极广,需要你的综合实力去答题. 最简单的题比如字符串的处理有的时候也要用到 ...

  3. graph-Dijkstra's shortest-path alogorithm

    直接贴代码吧,简明易懂. 后面自己写了测试,输入数据为: a b c d e 0 1 4 0 2 2 1 2 3 1 3 2 1 4 3 2 1 1 2 3 4 2 4 5 4 3 1 也就是课本上1 ...

  4. IIS发布网站Microsoft JET Database Engine 错误 '80004005'的解决办法,基于Access数据库

    在网站发布后,访问网站会有80004005的错误提示. 项目环境 项目基于Access数据库,server2012,文件系统为NTFS格式. 错误信息 Microsoft JETDatabase En ...

  5. ogre的初始化与启动以及显示对象设置

    ogre的使用方法1---自动设置 1.ogre初始化:首先实例化一个Root对象 Root * root = new Root(); Root * root = new Root("plu ...

  6. 大数据学习——sparkSql对接mysql

    1上传jar 2 加载驱动包 [root@mini1 bin]#  ./spark-shell --master spark://mini1:7077 --jars mysql-connector-j ...

  7. mongo以及mysql常用语句

    db.user.find({']}}).pretty(); db.user.find({primaryPhone:).forEach(function(user){print('my phonenum ...

  8. Wannafly模拟赛3

    喜欢想飞啊,毕竟这里的题目还都算挺好的中文题,不过做英文题久了还是感觉英文题更好理解一点 反蝴蝶效应 时间限制:1秒 空间限制:65536K 题目描述 一只南美洲亚马孙河流域热带雨林中的蝴蝶,偶尔扇动 ...

  9. CF878D D. Magic Breeding bitset

    D. Magic Breeding time limit per test 4 seconds memory limit per test 1024 megabytes input standard ...

  10. iOS学习笔记39-ReactiveCocoa入门

    FRP,全称为Functional Reactive Programming,是一种响应变化的编程范式,最近几年比较火,大概的理解就像这样: 当a的值或者b的值发生变化时,c的值会自动响应a的值或b的 ...