← All problemsSign in

Social Work

Along a road running in an east-west direction, there are A Old-age homes and B orphanages. The i-th old-age home from the west is located at a distance of si meters from the west end of the road, and the i-th orphanage from the west is located at a distance of ti meters from the west end of the road. Answer the following Q queries: Query i (1≤i≤Q): - If we start from a point at a distance of x

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