This page is still under construction.

Parts of this page are still being built. What you see may change.

Terraforming

Time limit1sMemory limit1024 MB

Summary
Adds up Mars oxygen, ocean, and temperature changes from a list and checks whether oxygen reaches 14%, oceans reach 9%, and temperature reaches +8 C.
Level

Easy1 of 10

Topics
Implementation, String
Solved
No attempts yet

Problem

Humanity's effort to turn Mars into a liveable planet is, in the words of World Government communicator Levi Uken (2315 A.D.), an "endeavour so great that it will take the united effort of mankind to accomplish."

At the beginning of the terraforming endeavour, Mars has no oceans, no oxygen, and a mean temperature of −30-30 degrees Celsius.

Water

To enable a stable hydrological cycle, air moisture, weather patterns, and to moderate temperature swings, Mars needs 9% ocean coverage.

Temperature

At very low temperatures, oceans are glaciers for most of the year. Although the temperature on Mars in the 21st century already reaches 20 degrees Celsius on hot summer days, its average is far below freezing. To enable liquid oceans, the temperature has to stay positive, at least at the equator, which corresponds to a mean temperature of +8 degrees Celsius.

Oxygen

The most important parameter for terraforming is oxygen. Without a breathable atmosphere, Mars is not liveable for humans. Earth's oxygen content is 21% of the atmosphere at sea level. However, 14% is already perfectly livable for humans. The Bolivian cities El Alto (4150 m) and La Paz (3640 m) each have nearly a million inhabitants in the 21st century.

Input

The first line contains the number n∈{1,…,315}n\in\{1,\ldots,315\} of environmental changes on Mars. Each of the following nn lines consists of a parameter (oxygen, ocean, or temperature), followed by an integer.

The change for oxygen and oceans is in percentage points. The change for temperature is in degrees Celsius.

Output

If the environmental changes achieve at least 9% ocean coverage, at least 14% oxygen, and at least +8 degrees Celsius, output 'liveable'. Otherwise, output 'not liveable'.

Examples2

  1. Example 1

    Input
    62
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    oxygen +1
    temperature +1
    temperature +1
    ocean +1
    temperature +1
    temperature +1
    oxygen +1
    temperature +1
    temperature +1
    temperature +1
    ocean +1
    oxygen +1
    temperature +1
    temperature +1
    oxygen +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    oxygen +1
    temperature +1
    oxygen +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    ocean +1
    temperature +1
    oxygen +1
    oxygen +1
    temperature +1
    ocean +1
    oxygen +1
    oxygen +1
    temperature +1
    temperature +1
    oxygen +1
    ocean +1
    temperature +1
    temperature +1
    oxygen +1
    ocean +1
    oxygen +1
    temperature +1
    temperature +1
    temperature +1
    temperature +1
    oxygen +1
    oxygen +1
    ocean +1
    temperature +1
    temperature +1
    ocean +1
    ocean +1
    temperature +1
    
    Expected output
    liveable
    
  2. Example 2

    Input
    13
    temperature +3
    oxygen +5
    temperature +1
    temperature +1
    temperature +3
    temperature +3
    oxygen +4
    temperature +2
    ocean +2
    oxygen +4
    ocean +5
    temperature +1
    temperature +3
    
    Expected output
    not liveable