Question: Problem J5/S2: Modern Art Problem Description A new and upcoming artist has a unique way to create checkered patterns. The idea is to use an

Problem J5/S2: Modern Art Problem Description A new and upcoming artist has a unique way to create checkered patterns. The idea is to use an M-by-N canvas which is initially entirely black. Then the artist repeatedly chooses a row or column and runs their magic brush along the row or column. The brush changes the colour of each cell in the row or column from black to gold or gold to black Given the artist's choices, your job is to determine how much gold appears in the pattern determined by these choices. Input Specification The first line of input will be a positive integer M. The second line of input will be a positive integer N. The third line of input will be a positive integer K. The remaining input will be K lines giving the choices made by the artist. Each of these lines will either be R followed by a single space and then an integer which is a row number, or C followed by a single space and then an integer which is a column number. Rows are numbered top down from 1 to M. Columns are numbered left to right from 1 to N. The following table shows how the available 15 marks are distributed. 1 mark M=1 N=1 4 marks M=1 N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
