Jug Filling
CodeChefOpen on judge ↗
You are provided with 2 jugs a and b. Consider you have infinite supply of water, you will be given an integer input N. You have to judge whether the given amount as input can be filled exactly in either of the two jugs. Read the explanation to better understand the problem. Input Format First line contains the number of test cases T. T lines follow. Each line contains 3 space separated intege
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