hdu 1495(bfs)

bfs分六种情况往下走,模拟倒的过程。 注意退出时必须是两个杯子均为s / 2,而不能是一个杯子,有可能另一半没汇聚到一个杯子里呢。WA了好几次...   #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; const int m
相关文章
相关标签/搜索