The 2nd problem in IOI 2013 states:
You have an Art History exam approaching, but you have been paying more attention to informatics at school than to your art classes! You will need to write a program to take the exam for you.
The exam will consist of several paintings. Each painting is an example of one of four distinctive styles, numbered 1, 2, 3 and 4. Style 1 contains neoplastic modern art. Style 2 contains impressionist landscapes. Style 3 contains expressionist action paintings. Style 4 contains colour field paintings.
Your task is, given a digital image of a painting, to determine which style the painting belongs to.
The image will be given as an H×W grid of pixels. The rows of the image are numbered 0, …, (H 1) from top to bottom, and the columns are numbered 0, …, W 1 from left to right. The pixels are described using twodimensional arrays R , G and B , which give the amount of red, green and blue respectively in each pixel of the image. These amounts range from 0 (no red, green or blue) to 255 (the maximum amount of red, green or blue).
Implementation You should submit a file that implements the function style(), as follows:
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]);
This function should determine the style of the image. Parameters are:
- H: The number of rows of pixels in the image.
- W: The number of columns of pixels in the image.
- R: A twodimensional array of size H×W , giving the amount of red in each pixel of the image.
- G: A twodimensional array of size H×W , giving the amount of green in each pixel of the image.
- B: A twodimensional array of size H×W , giving the amount of blue in each pixel of the image.
Example pictures are in the problem PDF
I do not want a readymade program. A hint or two to get me started would be nice, as I am clueless about this might be solved.