Carpet Conundrum
CodeChefOpen on judge ↗
Barry Allen lives in a N x N square feet apartment. He wants to carpet the entire floor but only square carpets of side lengths upto N-1 are available. Help Barry to cover his floor with the minimum number of carpets possible. Make sure that there is neither excess carpet nor empty spaces. Input A single integer N denoting the side length of Barry's apartment. Output In the first line, out
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