.
Link to blog post: http://raffysaldana.blogspot.com/2009/10/acm-icpc-asia-manila-2009-problem-b.html
2009 ACM ICPC Asia Manila
October 22 – 23, 2009
Problem B: ‘Typhoon Ondoy’
Input file: b.in
Output file: stdout
Execution time limit: 10 seconds
On September 26, 2009, Typhoon Ondoy brought a month's worth of rainfall to Metro Manila and nearby areas in just a few hours, causing severe flooding which resulted in the loss of many lives and the displacement of hundreds of thousands of people.
Areas under Storm Signal No. 2 included: Aurora, Quirino, Nueva Vizcaya, Nueva Ecija, Pangasinan, Tarlac, Zambales, Pampanga, Bulacan, Rizal, Northern Quezon, and Polillo Island.
Under Storm Signal No. 1 were: Isabela, Mountain Province, Ifugao, Benguet, La Union, Ilocos Sur, the rest of Quezon, Laguna, Cavite, Batangas, Mindoro provinces, Lubang Island, Marinduque, Camarines Norte, Bataan, and Metro Manila.
The Philippine Atmospheric Geophysical and Astronomical Services Administration (PAG-ASA) has come up with a measure to classify typhoons based on wind speed (in kph):
Tropical depressions have wind speeds of 30 to 46 kph (inclusive).
Tropical storms have wind speeds between 47 kph and 89 kph (inclusive).
Typhoons have wind speeds between 90 kph and 183 kph (inclusive).
Super typhoons have wind speeds greater than 183 kph.
TASK: Given a file containing wind speeds (in integer format, ranging from 1 to 255) your task is to produce a computer program that will display the type of typhoon based on wind speed. If the wind speed is between 1 and 29 kph (inclusive) then display the message “No classification”.
SAMPLE INPUT
1 50 100 60 155 200 90 46
SAMPLE OUTPUT
Case 1: No classification
Case 2: Tropical storm
Case 3: Typhoon
Case 4: Tropical storm
Case 5: Typhoon
Case 6: Super typhoon
Case 7: Typhoon
Case 8: Tropical depression
(Acknowledgment: This problem was contributed by Dr. Rafael Saldaña, Ateneo de Manila University)
.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment