An Easy-Peasy Problem
InterviewTime limit5sMemory limit1024 MB
Given solve counts at the halfway point and at the end of a contest, print E if at least half of the final solvers had solved it by the first half, otherwise H.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Travis was recently assigned to write the easy problem for a competitive programming contest aimed at high school students. Writing an easy problem is a challenge for Travis. A problem he labels as Medium Difficulty Level usually ends up being the hardest problem in the set.
This time, things were different. When the contest ended, everyone had solved Travis's problem. However, some of the other judges told Travis that a problem is easy only if at least half of the contestants solve it in the first half of the contest.
Travis has some data on his problem, and he wants to determine whether the problem was truly easy.
In programming competitions, solves is the number of correct submissions for a problem, that is, the number of contestants who solved it.
Given the number of solves at the end of the first half and at the end of the contest, determine whether at least half of the contestants solved the problem in the first half. The solves at the end of the contest include the solves from the first half.
Input
There is one input line with two integers, and (; ), the solves at the end of the first half and at the end of the contest, respectively.
Output
Print E if the problem is considered easy by the other judges' standards. Print H if it is not. Everyone knows that if Travis did not write an easy problem, the problem is probably hard.