文件名称:chenlieguan
- 所属分类:
- 数学计算/工程计算
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 865kb
- 下载次数:
- 0次
- 提 供 者:
- wak***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
世界名画陈列馆由nm × 个排列成矩形阵列的陈列室组成。为了防止名画被盗, 需要在陈列室中设置警卫机器人哨位。每个警卫机器人除了监视它所在的陈列室外,还可以监视与它所在的陈列室相邻的上、下、左、右4 个陈列室。试设计一个安排警卫机器人哨位的算法,使得名画陈列馆中每一个陈列室都在警卫机器人的监视之下,且所用的警卫机器人数最少。
算法设计:
设计一个优先队列式分支限界法,计算警卫机器人的最佳哨位安排,使得名画陈列馆中每一个陈列室都在警卫机器人的监视之下,且所用的警卫机器人数最少。
数据输入:
第一行有2 个正整数m和n (1≤m,n≤20)。
结果输出:
第一行是警卫机器人数;接下来的m行中每行n个数,0 表示无哨位,1 表示哨位。
例如:输入
4 4
输出
4
0 0 1 0
1 0 0 0
0 0 0 1
0 1-Famous paintings gallery arranged by the nm × a rectangular array of showroom component. In order to prevent the paintings stolen, you need to set the security robot sentinel showroom. Each robot in addition to monitoring its security in the showroom, but also can monitor it in the showroom and the adjacent, down, left and right four showrooms. Try to design a robot sentinel security arrangements for the algorithm, makes the paintings galleries in every showroom are under surveillance by security robots, and robots used in the least number of guards.
Algorithm Design:
Design a priority queue-type branch and bound method to calculate the best robot sentinel security arrangements, making paintings in each gallery showroom are under surveillance by security robots, and robots used in the least number of guards.
Data entry:
The first line has two positive integers m and n (1 ≤ m, n ≤ 20).
The resulting output:
The first line is the number of security robots the next m rows in
算法设计:
设计一个优先队列式分支限界法,计算警卫机器人的最佳哨位安排,使得名画陈列馆中每一个陈列室都在警卫机器人的监视之下,且所用的警卫机器人数最少。
数据输入:
第一行有2 个正整数m和n (1≤m,n≤20)。
结果输出:
第一行是警卫机器人数;接下来的m行中每行n个数,0 表示无哨位,1 表示哨位。
例如:输入
4 4
输出
4
0 0 1 0
1 0 0 0
0 0 0 1
0 1-Famous paintings gallery arranged by the nm × a rectangular array of showroom component. In order to prevent the paintings stolen, you need to set the security robot sentinel showroom. Each robot in addition to monitoring its security in the showroom, but also can monitor it in the showroom and the adjacent, down, left and right four showrooms. Try to design a robot sentinel security arrangements for the algorithm, makes the paintings galleries in every showroom are under surveillance by security robots, and robots used in the least number of guards.
Algorithm Design:
Design a priority queue-type branch and bound method to calculate the best robot sentinel security arrangements, making paintings in each gallery showroom are under surveillance by security robots, and robots used in the least number of guards.
Data entry:
The first line has two positive integers m and n (1 ≤ m, n ≤ 20).
The resulting output:
The first line is the number of security robots the next m rows in
(系统自动生成,下载前可以参看下载内容)
下载文件列表
chenlieguan\chenlieguan.cpp
...........\chenlieguan.dsp
...........\chenlieguan.dsw
...........\chenlieguan.ncb
...........\chenlieguan.opt
...........\chenlieguan.plg
...........\Debug\chenlieguan.exe
...........\.....\chenlieguan.ilk
...........\.....\chenlieguan.obj
...........\.....\chenlieguan.pch
...........\.....\chenlieguan.pdb
...........\.....\vc60.idb
...........\.....\vc60.pdb
...........\Debug
chenlieguan
...........\chenlieguan.dsp
...........\chenlieguan.dsw
...........\chenlieguan.ncb
...........\chenlieguan.opt
...........\chenlieguan.plg
...........\Debug\chenlieguan.exe
...........\.....\chenlieguan.ilk
...........\.....\chenlieguan.obj
...........\.....\chenlieguan.pch
...........\.....\chenlieguan.pdb
...........\.....\vc60.idb
...........\.....\vc60.pdb
...........\Debug
chenlieguan