Progressive Art (progressiveart)

45 teams scored 3380 points on this task, for a maximum score of 100, an average score of 75 and a median score of 80.

Highlights

  1. Pascal - Comandini, Cesena is the institute with the most points (340).
  2. Lombardia is the region with the most points (930).

Statement

Carlo is a big fan of progressive music and he recently found out that progressive paintings exist too! Clearly, he wants to dive into it, therefore he hired you as his assistant. A progressive painting is made using Vim, and consists of a rectangle of N × M coloured square cells. Since Carlo wants to be even more progressive, he only uses the colors red, green, and blue. Carlo has a weird way of judging the beauty of his works. He invented a measure called L-beauty. A square of size L (that is, consisiting of L× L contiguous cells of the painting) is beautiful if it contains and equal number of red, green, and blue cells. The L-beauty of the painting is the number of beautiful squares of size L in it. Carlo asked you a question to test your skill. Given N, M, L and K, does a painting with N rows, M columns, and an L-beauty equal to K exist? If so, could you paint one for him?