COSC307 Honors Lab 2

Please do the "BlackWhiteRectangles" problem, described in: http://web.eecs.utk.edu/~jplank/topcoder-writeups/2008/BlackWhiteRectangles/index.html.

What to hand in

You should submit the file BlackWhiteRectangles.cpp, which implements the following class / method:

class BlackWhiteRectangles {
  public:
    int blackCount(vector <string> rectangles);
};


How you'll be graded

Please see the Cryptography problem for a description of how these Topcoder problems are structured. The TA will copy main.cpp, tests.sh, gen_input.cpp and answers.txt from http://web.eecs.utk.edu/~jplank/topcoder-writeups/2008/BlackWhiteRectangles/index.html. The TA will put your BlackWhiteRectangles.cpp into that directory, and then do:
UNIX> g++ -o gen_input gen_input.cpp
UNIX> g++ main.cpp
The TA will then run tests.sh and your "gradescript" grade will be the number of correct lines of your output, divided by the number of tests. tests.sh should complete in under 5 seconds. There will still be points for commenting, structure, and memory usage.