Letter the columns A to E from left to right. Number the rows 1 to 5 from top to bottom. The top left-hand corner is A1, the box below it A2, and so on.
1) To satisfy the ‘diagonally adjacent’ rule in A1, B2 must be green.
2) B2 tells us that C2 is green.
3) One corner is adjacent to all green boxes. It can’t be A1 because of A1’s clue. It can’t be E1, since that would make both D2 and E2 green, and B2’s clue says there are only 3 green boxes in row 2.
Because of A1’s clue, either B1 or A2 is red. If B1 is red, then A2 is green. The ‘diagonally adjacent’ rule would make B3 green. If A5 was the corner adjacent to only green boxes, then B4 and B5 would be green, which is inconsistent with B2’s clue.
If A2 is red, then B1 is green. Again, if A5 is adjacent to only green boxes, then B4 and B5 would also be green, which would be inconsistent with B2’s clue. Neither possibility allows for A5 to be adjacent to only green boxes, so it can’t be A5.
E5, the only corner remaining, is adjacent to all green boxes.
4) C2’s clue lets us know that 3 of the 4 corners are green, one of which has been revealed already. E4 is green and tells us there are exactly 2 green boxes in that column, so only ONE of the corners E1 and E5 can be green, E2 and E3 must be red, and A5 must be one of the green corners. The diagonally adjacent rule tells us that B4 must also be green.
5) Suppose A2 was green. This would make B1 red from A1’s clue and B3 green by the diagonally adjacent rule.
A2, B2, and C2 would all be green now, and B2’s clue says there are only 3 green boxes in row 2, leaving D2 red (in a previous step, we determined that E2 was red).
Since B1 is red and B3 is green in this scenario, and B2 and B4 are already revealed as green, B5 must be red to satisfy B2’s clue.
D5’s clue says no row has exactly 4 green boxes, and E4’s clue says row 4 has at least one red box, so A4 and C4 would both be red.
D4’s clue says columns A and D must have 7 green boxes in total, and neither column can have exactly 2 green boxes because of E4’s clue. Recall that A2 is green and D2 and A4 are red in this scenario, and A1, A5, D4, and D5 have been revealed as green. This means that two out of the remaining boxes- A3, D1, and D3- must be green. D1 and D3 can’t both be green, since B3 is green in this scenario, and having D1 and D3 both be green would leave no row with only one green box, which is required by C2’s clue. To satisfy that clue in this scenario, A3 and D3 are green, and D1, along with the rest of the first row, is red. With E1 as a red corner, E5 must be green. Since no row contains exactly 4 green boxes, C5 must be red. C3 must also be red since no column other than column E can have exactly two green boxes.
All of this adds up to TWELVE red boxes and THIRTEEN green boxes, and we know from the quiz description that there are FIFTEEN green boxes. Therefore this scenario, which began with A2 being green and B1 being red , must be incorrect, and we must look to the other possibility.
6) B1 must be green and A2 must be red. Since B1, B2, and B4 are now green, B2’s clue requires B3 and B5 to be red. E4’s clue says there is at least one red box in row 4, and D5’s clue means that no row can have EXACTLY one red box, so row 4 must have 2 red boxes: A4 and C4, since the rest of the boxes in that row have been revealed as green.
Columns A and D must have 7 green boxes total. Five of the 10 boxes in those columns have been revealed as green and 2 have been revealed as red, so two out of A3, D1, and D3 must be green. If A3 was red, column A would have exactly two green boxes, and E4’s clue tells us that only column E has exactly 2 green boxes. Therefore A3 is green, and either D1 or D3 green. D3 cannot be green, because then no row would have exactly one green box, which is required by C2’s clue. This makes D1 green and D3 red. C3 must also be red to make row 3 have only one green box.
8) We are now at 12 green boxes, so three more must be green (out of the 4 unmarked boxes_. We know from C2’s clue that exactly one of the remaining corners is green, so both non-corner spaces- C1 and C5- must be green. D5’s clue tells us that no row can contain exactly 4 green boxes, so E1 must be green and E5 must be red.