Square in rectangles
CodeChefOpen on judge ↗
Squarectiland is a 2-dimensional plane that can be assumed to infinitely extend in all directions. There is a universal Cartesian coordinate system in Squarectiland, and thus each point is uniquely described by its coordinates $(x, y)$. The king of Squarectiland wants to build a new palace. The palace has to be a square with sides aligned with the coordinate axes. The palace can be arbitrarily la
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