摘要:
大意:隐式图的遍历。思路:通过BFS模拟倒水的过程。1、当前容器不为空且被倒容器还有剩余的体积。2、通过3维数组来判重。3、由于求的是最小的倒水量,如果最小量不存在则求最接近于要求倒水量的d,于是我们可以通过从大到小枚举每一个d值来求。CODE:#include<iostream>#include<cstdlib>#include<cstdio>#include<cstring>#include<queue>usingnamespacestd;#defineMAXN210constintINF=0x3f3f3f3f;structnod 阅读全文
posted @ 2012-10-10 20:11
有间博客
阅读(551)
评论(0)
推荐(0)
浙公网安备 33010602011771号