摘要: 迷宫问题 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能 阅读全文
posted @ 2017-07-24 20:52 yzm10 阅读(1054) 评论(0) 推荐(1) 编辑
摘要: Maze Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another 阅读全文
posted @ 2017-07-24 20:44 yzm10 阅读(391) 评论(1) 推荐(0) 编辑
摘要: Prime Ring Problem A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of num 阅读全文
posted @ 2017-07-24 20:30 yzm10 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangul 阅读全文
posted @ 2017-07-24 20:15 yzm10 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10358 Accepted Submission(s): 4046 Problem 阅读全文
posted @ 2017-07-24 16:32 yzm10 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 前几天觉得STL中没有树和图真是一种莫大的遗憾啊,但是在网上搜了搜,发现其实可以用容器很简单的构造树。 还是废话少说上代码: 就这么简单就可以构造树的节点。 然后我们可以简单的造一颗树 那么我们可以写个CreateTree来创建 当然构造了树在内存中又看不到,所以还得写个dfs输出。 有了树后添加节 阅读全文
posted @ 2017-07-24 14:38 yzm10 阅读(1717) 评论(0) 推荐(0) 编辑
摘要: 题目1009:二叉搜索树 从现在开始打算重启刷题征程。程序员的人生不需要解释! 这次撇开poj hoj等难度较大的oj系统,从九度入手(已经很长时间没写过代码了),主要先“叫醒” 沉睡依旧的大脑。唉~真的很长时间没写博客,没写代码了,只能加油吧! 题目如下 时间限制:1 秒 内存限制:32 兆 特殊 阅读全文
posted @ 2017-07-24 11:18 yzm10 阅读(233) 评论(0) 推荐(0) 编辑