![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
斯坦纳树
文章平均质量分 79
空灰冰魂
=NULL
展开
-
【BZOJ2595】【Wc2008】游览计划、斯坦纳树
题解:斯坦纳树,实现神马的在代码里面有还看得过去的注释。代码:#include #include #include #include #include #define N 15#define inf 0x3f3f3f3fusing namespace std;const int dx[]={0,0,1,-1};const int dy[]={1,-1,0,0};stru原创 2015-01-09 18:13:05 · 1472 阅读 · 0 评论 -
【模板】斯坦纳树
题目:斯坦纳树 Time Limit: 1 Sec Memory Limit: 128 MB Description 现在有一个n*m的矩阵,某些元素为0,剩下的元素大于0. 现在你要选择一些元素,使得任意两个为0的元素都能够通过选中的元素四连通. (注意,若想达到要求,所有的0自身必须被选中.) 那么请问选中元素的和的最小值是多少?Input 第一行两个整数n,m,表示矩原创 2015-06-15 09:02:50 · 2530 阅读 · 1 评论