WORTHY HEIR
CodeChefOpen on judge ↗
Rahman belongs to a lineage of mathematicians. Rahman's father had a big garden with many valuable trees. He has written in his will that Rahman can inherit one piece of SQUARE SHAPED land of a given size in the garden, such that its sides be parallel to the x and y axes. No other restrictions have been mentioned in the will. Rahman wants to choose the land in which the most number of trees lie
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