Magical World
Alice has two coloured shapes: 1. A **red** rectangle with length $A$ units, and width $B$ units. 2. A **blue** square with an edge length of $X$ units. Alice lives in a magical world where the dimensions of *red* shapes can be changed. Each change in dimension costs $1$ unit of money, using which you can change any single dimension of a red object to any **positive** integer. Alice wants to m
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