#C7089. Maximizing Seed Planting in a Grid
Maximizing Seed Planting in a Grid
Maximizing Seed Planting in a Grid
You are given a grid with ( n ) rows and ( m ) columns along with two additional parameters ( k ) and ( l ) that are related to planting restrictions for two types of seeds: Type A and Type B. Your task is to plant the seeds in the grid in two stages. In the first stage, you must plant as many Type A seeds as possible. In the second stage, you plant Type B seeds in the remaining empty cells. Note that, under the given constraints, planting Type A seeds in every cell is always optimal, which results in no available cells for Type B seeds. Therefore, the answer will always be ( (n \times m,\ 0) ).
Constraints: Inputs are four integers where ( 1 \leq n, m \leq 10^9 ) (although the constraints on ( k ) and ( l ) are irrelevant in this problem as they do not affect the optimal strategy).
inputFormat
A single line containing four space-separated integers: ( n ), ( m ), ( k ), and ( l ).
( n ) and ( m ) specify the dimensions of the grid, while ( k ) and ( l ) are additional parameters representing planting restrictions (which do not change the outcome for this problem).
outputFormat
Output two space-separated integers where the first integer is the total number of cells planted with Type A seeds, and the second is the number of cells planted with Type B seeds.## sample
3 3 2 3
9 0
</p>