2.9题目翻译

https://acs.jxnu.edu.cn/problem/HDU1307

描述:

An n-tersecntio is defined as a location in n-dimensional space, n being a positive integer, having all non-negative integer coordinates. For example, the location (1,2,3) represents an n-tersection in three dimensional space. Two n-tersections are said to be adjacent if they have the same number of dimensions and their coordinates differ by exactly 1 in a single dimension only. For example, (1,2,3) is adjacent to (0,2,3) and (2,2,3) and (1,2,4), but not to (2,3,3) or (3,2,3) or (1,2). An n-teresting space is defined as a collection of paths between adjacent n-tersections.

Finally, an n-credible maze is defined as an n-teresting space combined with two specific n-tersections in that space, one of which is identified as the starting n-tersection and the other as the ending n-tersection.

输入:

The input file will consist of the descriptions of one or more n-credible mazes. The first line of the description will specify n, the dimension of the n-teresting space. (For this problem, n will not exceed 10, and all coordinate values will be less than 10.) The next line will contain 2n non-negative integers, the first n of which describe the starting n-tersection, least dimension first, and the next n of which describe the ending n-tersection. Next will be a nonnegative number of lines containing 2n non-negative integers each, identifying paths between adjacent n-tersections in the n-teresting space. The list is terminated by a line containing only the value ?. Several such maze descriptions may be present in the file. The end of the input is signalled by space dimension of zero. No further data will follow this terminating zero.

输出:

For each maze output it's position in the input; e.g. the first maze is "Maze #1", the second is "Maze #2", etc. If it is possible to travel through the n-credible maze's n-teresting space from the starting n-tersection to the ending n-tersection, also output "can be travelled" on the same line. If such travel is not possible, output "cannot be travelled" instead

 n-tersecntio

定义为n维空间中的一个位置,n为一个正整数,具有所有非负整数坐标。例如,位置(1,2,3)表示n分剖面在三维空间中。如果两个n分位截面具有相同的维度,并且它们的坐标仅在一个维度上恰好相差1,则说它们是相邻的。例如,(1、2 ,3)相邻(0,2,3)、(2,2,3)和(1,2,4),但不相邻(2,3,3)或(3,2,3)或(1,2)。n-teresting 空间定义为相邻n截面之间的路径集合。最后,迷宫被定义为由该空间中两个特定的n段结合的空间,其中一个被确定为起始n段,另一个被确定为结束n段。

输入:

输入文件将由一个或多个迷宫的描述组成。描述的第一行将指定n,即n个测试空间的维度。(对于这个问题,n将不会超过10,并且所有的坐标值都将小于10。)下一行将包含2n个非负整数,其中第一个n描述起始n截面、最小维数和接下来他描述了n节的结尾。接下来将是一个非负数的行,每个行包含2n个非负整数,识别n段中相邻的n段之间的空间。列表以仅包含值的行终止。该文件中可能会出现几种这样的迷宫描述。输入的结束表示空间维度为零。其他的数据将遵循这个终止。

输出:

对于每个迷宫的输出,它在输入中的位置例如,第一个迷宫是“迷宫1”,第二个迷宫是“迷宫2”,等等。如果有可能穿过迷宫的空间标记n段到n段结尾,输出也“可以在同一行上移动”。如果这样的行程是不可能的,输出“不能行程”代替

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值