摘要: 呃,感觉题意不是很明白,“由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。”其实题意是说:所有的外表面+最下层的圆面积。(蛋糕从上往下俯视....只有一个最大的园面) 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #include <cmath> 6 using namespace std; 7 8 #define inf 999999999 9 #defin 阅读全文
posted @ 2012-09-30 17:32 Missa 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 八数码问题:bfs实现.... 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <string> 5 #include <algorithm> 6 #include <cmath> 7 #include <queue> 8 9 using namespace std; 10 11 #define MAXN 363000 //9!==326880 12 13 struct node 14 { 15 int s[9] 阅读全文
posted @ 2012-09-30 00:29 Missa 阅读(458) 评论(0) 推荐(0) 编辑