摘要: 题意:找到总时间最少的KFC 分析:两遍BFS 找KFC比较一下 注:有些地方的KFC可能到达不了,wa了一次 #include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <cmath> 阅读全文
posted @ 2016-01-31 12:26 shuguangzw 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题意:有个为三个杯子(杯子没有刻度),体积为s,n,m,s=m+n, 刚开始只有体积为s的杯子装满可乐,可以互相倒,问你最少的次数使可乐均分,如果没有结果,输出-1; 分析:直接互相倒就完了,BFS模拟 注:写的很丑 #include <iostream> #include <cstdio> #in 阅读全文
posted @ 2016-01-31 11:36 shuguangzw 阅读(159) 评论(0) 推荐(0) 编辑