← All problemsSign in

Colouring Ways

You are given N boxes with label 1,2,3,...., N and three colours 'R', 'B' and 'G' and each colour have some consecutively coloring limit means you can consecutively color boxes with one color not more than its given limit. You have to paint the boxes using given colour. Now your task is to find the total number of ways to paint the boxes. The answer can be very large so you have to print answer mo

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