转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents
题目链接:http://poj.org/problem?id=1606
此题和poj3414一样:http://blog.csdn.net/u012860063/article/details/37768979
Description
In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly 4 gallons. This problem generalizes that puzzle.
You have two jugs, A and B, and an infinite supply of water. There are three types of actions that you can use: (1) you can fill a jug, (2)
You have two jugs, A and B, and an infinite supply of water. There are three types of actions that you can use: (1) you can fill a jug, (2)