Human vs Artificial Intelligence
CodeChefOpen on judge ↗
The classic Two jug problem is to find out if, given 2 jugs, A and B of capacity Ca and Cb, is it possible to get a volume V in jug B.Considering the only moves being - FILLA, FILLB, POURA, POURB, EMPTYA, EMPTYB; where POURA means pouring the water from jug A to B untill either A is empty or B is full. In a contest between human and Computers to test whether computers can beat humans in solving t
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