IS IT BITMASK HARD!!
CodeChefOpen on judge ↗
$Chef$ wants to paint a wall that is divided into $N*M$ blocks. $Chef$ has 5 colors c1,c2,c3,c4,c5 of which c1 is the favorite color of a $chef$, so he wants at least 1 block painted with his favorite color. Block can remain unpainted but no two consecutive blocks in a row remain unpainted and at least $\lfloor M/4 \rfloor$ painted blocks in $each$ $row$. Determine the number of ways in which $Che
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