Welcome to Yumao′s Blog.
ACM-Jugs
, 2010年03月24日 , , 评论 在〈ACM-Jugs〉中留言功能已關閉 ,

Jugs

——————————————————————————–

Time limit: 1 Seconds   Memory limit: 32768K   Special Judge
Total Submit: 939   Accepted Submit: 480  

——————————————————————————–

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.

评论已关闭