#K11446. Detecting a Heatwave

    ID: 23470 Type: Default 1000ms 256MiB

Detecting a Heatwave

Detecting a Heatwave

Given a sequence of daily temperatures, a heatwave is defined as a period where the temperatures strictly increase for three consecutive days. Formally, a heatwave occurs if there exists an index \(i\) such that \(T_i < T_{i+1} < T_{i+2}\). Your task is to determine whether such a pattern exists in the provided sequence.

inputFormat

The input is read from standard input (stdin) and consists of two lines:

  • The first line contains an integer N representing the number of days.
  • The second line contains N space-separated integers representing the daily temperatures.

outputFormat

Output a single line to standard output (stdout) containing either True if a heatwave is detected, or False otherwise.

## sample
6
30 32 34 33 35 37
True