← All problemsSign in

MAD ART

Rishi always watches a show named MAD ART. He found a whiteboard of dimensions **N** and **M** denoting height and width. It looked so dull, he wanted to make it colorful by painting it with oil paints. He tries to imagine a matrix of **N** x **M** segments in it. He wants to paint **Ri** segments in each row, also he wants only **Ci** segments to be painted in each column. other segments remai

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start