#C6704. Temperature Trend Prediction

    ID: 50494 Type: Default 1000ms 256MiB

Temperature Trend Prediction

Temperature Trend Prediction

Given the current day's temperature and a sequence of temperature predictions for the next n days, determine whether each day's temperature indicates an increase, decrease, or no change compared to the previous day. Let the current temperature be \(T_0\) and the predicted temperatures be \(T_1, T_2, \dots, T_n\). For each \(i = 1, 2, \dots, n\):

  • If \(T_i > T_{i-1}\), output Rise.
  • If \(T_i < T_{i-1}\), output Fall.
  • If \(T_i = T_{i-1}\), output Same.

The trends must be printed in order on a single line, separated by a space.

inputFormat

The input is provided via stdin and consists of two lines:

  1. The first line contains two integers: n (the number of days) and today_temp (today's temperature).
  2. The second line contains n integers representing the predicted temperatures for the next n days.

outputFormat

Output the result to stdout as a single line containing n words separated by spaces. Each word should be one of: Rise, Fall, or Same, corresponding to the trend in temperature.

## sample
5 20
22 23 24 25 26
Rise Rise Rise Rise Rise