← All problemsSign in

Hamza and Naief

Hamza and Naief are very good friends. One day, Naief tells Hamza that his birthday is coming up and he is having a party at his house. Naief invites Hamza to his party and makes him promise that he is going to be there. Hamza lives at the origin of the cartesian plane. Naief lives on the diagonal at a point (n,n). Hamza, however, has a list of constraints which he has to follow on his way to Nai

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