三杯倒水问题
三杯倒水问题
前几天刷B站,看到一个很有意思的视频,链接如下
转到哔哩哔哩
大意就是用三个只知道容量的杯子量出指定体积的水
这里就是5ml(满),6ml(满),10ml(空)量出8ml
瞎倒了半天,也没倒出来,这让我第一次知道原来互动视频也能死循环🤣
看到评论区有人用逆推法得到了答案,我就想能否编程求解所有方法
想了想,正好可以用回溯解决
思路是这样的
分别用
vector<vector<vector<int>>> answer
和vector<vector<vector<int>>> operation
储存所有状态和操作
每一次最多有六种不同的倒水方式(如果有空杯或满杯,则少于六种)
尝试这六种倒水方式,把方式记录到oneoperation中,现在水的状态记录到now中,然后存入oneanswer
如果成功地将第三杯中倒入了8ml的水,就保存到最终结果的answer和operation中
终止搜索的条件是现在的状态和之前某次一样(说明出现了循环)
完整代码如下
1 |
|
由于数据规模较小,用了26ms就完成了搜索,得到了62种解法
太长了,所以把它折叠起来了(单击打开)
solution1: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to left, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution2: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to left, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution3: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution4: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution5: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution6: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution7: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution8: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution9: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution10: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution11: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution12: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution13: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution14: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution15: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution16: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution17: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution18: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution19: pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution20: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to left, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution21: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to left, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution22: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution23: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution24: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution25: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution26: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution27: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution28: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution29: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution30: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution31: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution32: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution33: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution34: pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour right to left, now is 5 1 5 pour right to middle, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution35: pour left to right, now is 0 6 5 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution36: pour left to right, now is 0 6 5 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution37: pour left to right, now is 0 6 5 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution38: pour left to right, now is 0 6 5 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution39: pour left to right, now is 0 6 5 pour right to left, now is 5 6 0 pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution40: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution41: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution42: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution43: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution44: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution45: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution46: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour middle to right, now is 3 0 8 solution47: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour right to left, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution48: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour left to middle, now is 3 6 2 pour right to left, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution49: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution50: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to left, now is 5 4 2 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution51: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to middle, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution52: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to middle, now is 0 4 7 pour right to middle, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution53: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour middle to right, now is 4 0 7 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution54: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour right to left, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution55: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour left to middle, now is 4 6 1 pour right to left, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution56: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution57: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to left, now is 5 5 1 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution58: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to middle, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution59: pour middle to right, now is 5 0 6 pour left to middle, now is 0 5 6 pour right to middle, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution60: pour middle to right, now is 5 0 6 pour left to right, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution61: pour middle to right, now is 5 0 6 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to left, now is 5 1 5 pour left to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8 solution62: pour middle to right, now is 5 0 6 pour right to middle, now is 5 6 0 pour left to right, now is 0 6 5 pour middle to right, now is 0 1 10 pour middle to left, now is 1 0 10 pour right to middle, now is 1 6 4 pour middle to left, now is 5 2 4 pour left to right, now is 0 2 9 pour middle to left, now is 2 0 9 pour right to middle, now is 2 6 3 pour middle to left, now is 5 3 3 pour left to right, now is 0 3 8
1 | solution46: |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 HeRen's Blog!
评论