RGB Grid (Medium)
**This is the medium version of the problem. The only difference between this and other versions is the constraints on $N$ and $M$ — notably, in this version, $1 \le N \le 5$ and $1 \le M \le 50$.\ This problem is worth $30$ points in divisions $1$ and $2$.** Consider a grid of size $N \times M$, where each cell contains one of the characters `R`, `G`, or `B`. You are asked to count the number
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