As Far As It Takes Me
CodeChefOpen on judge ↗
Vicky has embarked on a tour where he travels only by buses running over small distances. In general there are n buses all going in the same direction, with the ith bus starting at (xi – 1) km from his starting point and running upto yi km from his starting point covering (yi – xi + 1) km. The buses do not stop anywhere in between so Vicky cannot switch buses while in the middle of a b
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