暑假集训-搜索
迭代加深搜索
dancing links 精确覆盖
0 / 18 | Problem A | HDU 1043 | Eight(South Central USA 1998) | |
15 / 37 | Problem B | HDU 2553 | N皇后问题 | |
11 / 15 | Problem C | HDU 1312 | Red and Black | |
4 / 18 | Problem D | HDU 3501 | Calculation 2 | |
9 / 22 | Problem E | HDU 2266 | How Many Equations Can You Find | |
0 / 1 | Problem F | POJ 1011 | Sticks(Central Europe 1995) | |
6 / 14 | Problem G | POJ 2488 | A Knight's Journey | |
5 / 9 | Problem H | HDU 1172 | 猜数字 | |
Problem I | HDU 1026 | Ignatius and the Princess I | ||
1 / 2 | Problem J | POJ 1190 | 生日蛋糕(Noi 99) | |
4 / 4 | Problem K | HDU 1258 | Sum It Up | |
Problem L | POJ 1020 | Anniversary Cake | ||
2 / 9 | Problem M | HDU 1180 | 诡异的楼梯 |
A题
八数码,不知道为什么用cantor过不了,要用A*?
生日蛋糕
因为前dep层的体积为sumv,那么剩余的m-dep层的体积满足:n-sumv=(h[k]*(r[k]^2)+……+h[1]*(r[1]^2)) (k = dep...1) (k=dep+1,……,m)
而剩余部分的表面积满足:lefts=2*(r[k]*h[k]+……+r[1]*h[1])>2*(n-sumv)/r[dep] (k = dep...1) (k=dep+1,……,m)
显然有上述不等式lefts=best-sums>2*(n-sumv)/r,即2*(n-sumv)/r+sums<best,所以当2*(n-sumv)/r[i]+sums>=best时也可以进行剪枝.
搜索其实都好打,就是剪枝不太好想。