| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 392 人关注过本帖
标题:[求助]程序设计,与数据结构有关的
只看楼主 加入收藏
kcbastian
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-15
收藏
 问题点数:0 回复次数:3 
[求助]程序设计,与数据结构有关的

鄙人有一个程序要马上编出来,用c编,要在linux下运行的
希望高手帮帮忙,对我非常重要的...
我会想尽一切办法报答各位的!!!!!!!
Problem Descriptions
o The problem is based on a plane flight game in a
3D environment. You are asked to design your
algorithm with the implementation of queues,
stacks and array to find the shortest path for the
plane to fly safely from the start point to the end
point.
o The 3D game environment is divided into n*m*o
blocks. Each block has its own value to represent
the geographical character of the block. To
simplify the problem, there are only two values
adopted: v=0 means the block is accessible; v=1
means the block is not accessible. The plane is
allowed to visit each block no more than once.
o In the 3D game environment, the plane could
move only in five directions (upward, download,
left, right and forward). For each movement, we assigned a corresponding
movement ID value, as shown below:
Movement ID Value
Forward 1
Left 2
Right 3
Downward 4
Upward 5
The standard output of your program should observe these values.
o At the start point, the plane has a given amount of fuel s. During the flight, each
movement will deduct the amount of fuel by one (s = s - 1). If the plane is out of oilbefore it reaches the end point, the mission fails. There are a few fuel backup
packs distributed over the environment. When the plane reaches the location of
the pack pi, it gets re-fuel with a specified amount wi (s = s + wi). The pack is
eliminated from the environment after the refuel.
o The input data will be in the format of text file. The schema is designed as
following:
o The output solution should be in the format of text file. The schema should be in
accord as following:
 Submission Procedures
Please follow the submission procedures, so that we could ensure your assignment is
received probably.
o Create a folder named with your student Id, in the following steps we will use the
id “03012345” as an example.
o Put all the source codes into the folder, including:
 the source files;
 the header files;
 and the makefile.
o Please do not include the executable file.
Output.txt
t //the number of steps for the shortest path
d1 d2 d3 d4 … dt //the directions taken on each step
f //the amount of fuel left when reaching the end point
//end of output file
Input.txt
n+1 m+1 o+1 //the num of blocks in each dimension.
s //the amount of fuel at the starting point
xs ys zs //the start point position (Range from [0,n] [0,m],[0,o])
xe ye ze //the end point position
//the detailed map information using 0-1 representation
map(0,0,0) map(0,0,1) map(0,0,2) … map(0,0,o)
map(0,1,0) map(0,1,1) map(0,1,2) … map(0,0,o)
… …
map(0,m,0) map(0,m,1) map(0,m,2) … map(0,m,o)
map(1,0,0) map(1,0,1) map (1,0,2) … map(1,0,o)
… …
map(n,m,0) map(n,m,1) map(n,m,2) … map(n,m,o)
//end of map information
Fn // the number of fuel backup packs
xa ya za qa // the position(x,y,z) and the refuel amount (q) of fuel pack a
… …
xFn yFn zFn qFn
//end of input file

搜索更多相关主题的帖子: 数据结构 程序设计 
2007-03-15 22:23
kcbastian
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-15
收藏
得分:0 
自己顶
2007-03-15 22:25
kcbastian
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-15
收藏
得分:0 

求求各位了,我本来不是干这行的,但是为了帮别人,不得已这样的

2007-03-15 22:31
kcbastian
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-15
收藏
得分:0 
求求大家!!!!!!!!
2007-03-15 23:22
快速回复:[求助]程序设计,与数据结构有关的
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015612 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved