Chocolate Bar
CodeChefOpen on judge ↗
Alice and her friend Bob are both fond of chocolates. Unfortunately they had only one chocolate bar left so they wanted to break the bar into its individual square pieces. The chocolate bar is in the shape of a n X m grid , It can only be broken down into its pieces along the horizontal and vertical grooves. As both of them are hungry they want to break the chocolate bar into its pieces using the
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