Programming Homework Help

Programming Homework Help. Colorful Garden, comp science in C language.

Must be in C language please.

Problem
Given:

a list of row descriptions and column descriptions determine a possible arrangement of
flowers that adheres to the constraints.

Input:

Input will begin with a line containing 2 integers, r and c (1 ≤ r, c ≤ 15), representing the number
of rows and columns for the flower arrangement.

The following r lines will each contain a row description. The row description starts with a
non-negative integer, gb, representing the number of groups of black flowers in the
corresponding row. Following this integer will be gb positive integers representing the group
sizes for the black flowers in the corresponding row.

Following the row descriptions will be c lines each containing a column description. The column
description starts with a non-negative integer, gb, representing the number of groups of black
flowers in the corresponding column. Following this integer will be gb positive integers
representing the group sizes for the black flowers in the corresponding column.

It is guaranteed that at least one arrangement will work for the given input.

Output:

Output should contain r lines. Each line will contain c character. The i-th character of the j-th
line represents the color of a plant (“r” for red and “B” for black).

(Chart is in the PDF for one of the examples of inputs and outputs)

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"