上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
posted @ 2019-12-01 21:37 57one 阅读(143) 评论(0) 推荐(0)
摘要: Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文
posted @ 2019-12-01 20:52 57one 阅读(111) 评论(0) 推荐(0)
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2019-12-01 18:21 57one 阅读(146) 评论(0) 推荐(0)
摘要: 昨天看了一下广度意义上的深度遍历(dfs) 今天接着学到了广度意义上的广度优先遍历(bfs) 这种广度优先遍历在实际意义上与图中深度遍历优先是类似的 dfs隐含的利用了栈(递归),bfs则是利用了队列 这道题便是利用bfs的一道题 每次从栈中弹出元素 都会把它上下左右四个方向检测将未访问可达的元素入 阅读全文
posted @ 2019-11-29 23:30 57one 阅读(206) 评论(0) 推荐(0)
摘要: 题目分析:这是利用深度优先遍历的题(dfs) 我原来以为dfs只是特指图中的深度优先遍历 没想到其实更能代表一种思想 : 从最开始的状态出发 遍历所有可以到达的状态 也由此可以对所有状态进行操作 就这道题而言 要做出需要2种思想 1.得把计算水洼转化 首先当我们分析过某个水洼后就把它置为‘.' 以防 阅读全文
posted @ 2019-11-28 21:26 57one 阅读(145) 评论(0) 推荐(0)
摘要: 1023 Have Fun with Numbers (20 分) Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication 阅读全文
posted @ 2019-11-26 18:12 57one 阅读(140) 评论(0) 推荐(0)
摘要: 1022 Digital Library (30 分) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, pub 阅读全文
posted @ 2019-11-26 16:52 57one 阅读(150) 评论(0) 推荐(0)
摘要: A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the 阅读全文
posted @ 2019-11-25 20:50 57one 阅读(135) 评论(0) 推荐(0)
摘要: Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou 阅读全文
posted @ 2019-11-25 17:17 57one 阅读(173) 评论(0) 推荐(0)
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2019-11-24 23:01 57one 阅读(125) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页