Flipping Rectangles
CodeChefOpen on judge ↗
Fluffy is playing a game called "Flip the Rectangle" today. First, he was given a n times n grid which initially contains all zeroes. Every move consists of choosing a subrectangle of the grid and flipping the numbers in every square of the subrectangle. There are two possible numbers for each square, 0 or 1. Flipping a 0 will yield a 1 and vice versa. Fluffy has performed q moves to the grid, bu
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start