Different Annotations for Different Outcomes
Harbourline Retail's customer-satisfaction score is charted once a quarter, and the chart carries a one-word verdict so the reader is not left squinting at a wobbly line. The verdict compares where the score ended up against where it started — not against last quarter, because the point of the chart is the whole span. The same word is pasted into the board pack.
Task: Print the one-word verdict on the score's overall move.
Input
The first line holds one integer n, the number of readings, in time order. Each of the next n lines holds one reading, a number on its own.
Output
One line holding exactly one of Improved, Declined or Flat, capitalised as shown. Compare the last reading against the first: higher is Improved, lower is Declined, and exactly equal is Flat. Whatever happens between them does not change the verdict.
Example:
Input:
3
50
60
70
Output:
Improved
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in