HydroloGIS
The Hydrology Laboratory of the National Technical University of Athens (NTUA) has developed a Geographic Information System (GIS) for monitoring hydrological data in the Greek territory (http://titan.chi.civil.ntua.gr/website/greece/viewer.htm). The hydroinformatics authorities are developing numerous applications for real-time processing of a plethora of hydrological data.
For calculating water reserves, several parameters are utilized, mainly: rainfall in millimeters N and sunshine days (evapotranspiration) M, along with the corresponding coefficients a and b for the watershed under study. Of particular interest is the fact that, using appropriate coefficients, each millimeter of rainfall operates multiplicatively on the reserves accumulated previously, and each sunshine day adds to evaporation. For example, for millimeters of rainfall and sunshine days, the total volume of water collected (in cubic meters) is:
/ ()
(: Existing reserves, a: concentration coefficient, b: evaporation coefficient).
Problem:
Develop a program in one of the languages of the IOI that reads the above values and calculates the water reserves of a watershed.
Input Files:
The input files, named hydrologis.in, are text files containing five lines with integer numbers N, M, , a, b. For these numbers, the following holds: (), (), (), ().
Output Files:
The output files, named hydrologis.out, are text files with the following structure. They have one line with exactly one integer: the nearest integer to the cubic meters of water reserves V ().
Example of Input - Output File
STDIN (hydrologis.in)
15
100
1000000
1
10
STDOUT (hydrologis.out)
2257174
Formatting: In the output, each line terminates with a newline
character.
Maximum execution time: 2 sec.
Comments