Piece of Cloth
CodeChefOpen on judge ↗
Sneha brought a rectangular cloth to stitch her birthday dress. The cloth's design is in the form of a grid of $N$ rows and $M$ columns, each cell contains white color or black color. Sneha wants to cut out a sub-rectangle from the cloth which contains even number of black cells. Before cutting such a sub-rectangle, she is interested in knowing how many sub-rectangles are there which contains eve
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