Jungle Safari and the Boat
CodeChefOpen on judge ↗
Jordan and his friends went on a jungle safari, where they have to cross a river and Jordan has took the responsibility of helping everyone paas the brook. But the problem is, the boat can carry at most two people at the same time, provided the sum of the weight of those people is at most the limit of the boat. If P[i] signifies a person's weight,and each boat can carry a maximum weight of limit
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