← All problemsSign in

Painter Problem

CodeChefRating 2645Open on judge ↗

Chef is a painter. He likes to draw geometric figures and among them, he especially loves isosceles right triangles. The longest side of a right triangle is called its hypotenuse. Chef drew $N$ isosceles right triangles (numbered $1$ through $N$) on an infinite sheet of paper, which can be represented by a Cartesian half-plane (containing all points $(x, y)$ such that $y \ge 0$), in such a way tha

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start