OI赛题1077: Biggest Number题解

庄子墨 算法基础篇 45 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
You have a maze with obstacles and non-zero digits in it:. You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighbouring squares and you cannot walk into obstacles or walk into a square more than once. When you finish, you can get a number by writing down the digits you encounter in the same order as you meet them. For example, you can get numbers 9784, 4832145 etc. The biggest number you can get is 791452384, shown in the picture above.Your task is to find the biggest number you can get.

You have a maze with obstacles and non-zero digits in it:     You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighbouring squares (up, down, left, right) and you cannot walk into obstacles or walk into a square more than once. When you finish, you can get a number by writing down the digits you encounter in the same order as you meet them. For example, you can get numbers 9784, 4832145 etc. The biggest number you can get is 791452384, shown in the picture above. Your task is to find the biggest number you can get.

OI赛题1077: Biggest Number题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: OI赛题1077: Biggest Number题解