CF1030A.In Search of an Easy Problem

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

在筹备一场编程竞赛时,Codeforces 的协调员会尽力使第一道题尽可能简单。本次协调员选定了一道题目,并向 nn 个人征询了他们的意见。每个人回答了该题是“简单”还是“困难”。

如果这 nn 个人中至少有一人认为该题是“困难”的,则协调员决定更换该题。给定这些人的回答,请判断该题是否足够简单。

输入格式

The first line contains a single integer nn (1≤n≤1001 \le n \le 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.

第一行包含一个整数 nn(1≤n≤1001 \le n \le 100)—— 表示被询问意见的人数。

第二行包含 nn 个整数,每个整数为 00 或 11。若第 ii 个整数为 00,则表示第 ii 个人认为该问题简单;若为 11,则表示第 ii 个人认为该问题困难。

输出格式

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.

如果根据所有人的回答,该问题都很容易,则输出一个单词:“EASY”;如果至少有一人认为该问题很难,则输出“HARD”。

您可以以任意大小写形式输出每个字母:“EASY”、“easy”、“EaSY” 和 “eAsY” 均会被正确判别。

输入输出样例

  • 输入#1

    3
    0 0 1

    输出#1

    HARD
  • 输入#2

    1
    0

    输出#2

    EASY

说明/提示

In the first example the third person says it's a hard problem, so it should be replaced.

In the second example the problem easy for the only person, so it doesn't have to be replaced.

在第一个例子中,第三人称说这是一个难题,因此应当将其替换。

在第二个例子中,该问题对唯一一人来说是简单的,因此无需替换。

输入解题思路,AI测评打分。不知道怎么写?

首页