A heat wave is a prolonged period of excessively hot weather. While definitions vary, heat waves are always measured relative to the usual weather in the area and relative to normal temperatures for the season. Temperatures that people from a hotter climate consider normal can be termed a heat wave in a cooler area if they are outside the normal climate pattern for that area. For example, the KMI1 (Belgium) and the KNMI2 (the Netherlands) define a heat wave as a period of at least five consecutive days in which the maximum temperature is at least 25 °C (summer days), provided that on at least three days in this period the maximum temperature is at least 30 °C (tropical days). Temperatures are measured one and a half meters above ground level in a so-called Stevenson screen3.
In common usage, however, people tend to use the term heat wave for periods that do no strictly meet the above criteria. Below are two fictional examples of a real heat wave (left) and a warm period that is not officially accounted as a heat wave (right).
date | maximum temperature |
---|---|
July 12 | 24.7 °C |
July 13 | 25.1 °C |
July 14 | 28.9 °C |
July 15 | 31.0 °C |
July 16 | 28.6 °C |
July 17 | 30.6 °C |
July 18 | 32.4 °C |
July 19 | 23.0 °C |
date | maximum temperature |
---|---|
August 9 | 26.0 °C |
August 10 | 24.1 °C |
August 11 | 29.4 °C |
August 12 | 32.8 °C |
August 13 | 34.0 °C |
August 14 | 25.5 °C |
August 15 | 20.1 °C |
August 16 | 19.0 °C |
A sequence of floating point numbers, each on a separate line. These numbers represent the maximum temperatures measured in a Stevenson screen over a period of consecutive days. The sequence ends with a line that contains the word stop.
The text heat wave if at least one heat wave was observed during the given period according to the definition of the KMI and KNMI, or the text no heat wave otherwise.
Input:
24.7
25.1
28.9
31.0
28.6
30.6
32.4
23.0
stop
Output:
heat wave
Input:
26.0 24.1 29.4 32.8 34.0 25.5 20.1 19.0 stop
Output:
no heat wave
A blast of hot air passed from south to north through portions of New Ulm and Renville County last Sunday evening. It lasted only a minute or two, but so intense was the heat that people rushed out of their houses believing them to be on fire.
— Minneapolis Tribune, July 10, 1879