上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页

1124 Raffle for Weibo Followers (20 分)

摘要: 1124 Raffle for Weibo Followers (20 分) John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- 阅读全文
posted @ 2019-01-26 15:47 ZhangのBlog 阅读(134) 评论(0) 推荐(0)

1134 Vertex Cover (25 分)图

摘要: 1134 Vertex Cover (25 分) A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set 阅读全文
posted @ 2019-01-26 15:22 ZhangのBlog 阅读(252) 评论(0) 推荐(0)

1142 Maximal Clique (25 分)图

摘要: 1142 Maximal Clique (25 分) A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A 阅读全文
posted @ 2019-01-26 14:42 ZhangのBlog 阅读(162) 评论(0) 推荐(0)

1146 Topological Order (25 分)判断拓扑序列

摘要: 1146 Topological Order (25 分) This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtaine 阅读全文
posted @ 2019-01-26 13:00 ZhangのBlog 阅读(303) 评论(0) 推荐(0)

1138 Postorder Traversal (25 分)前序和中序遍历转为后序

摘要: 1138 Postorder Traversal (25 分) Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal se 阅读全文
posted @ 2019-01-25 20:50 ZhangのBlog 阅读(582) 评论(0) 推荐(0)

1119 Pre- and Post-order Traversals (30 分)前序、后序序列转为中序

摘要: pat甲级,二叉树遍历 阅读全文
posted @ 2019-01-24 21:32 ZhangのBlog 阅读(261) 评论(0) 推荐(0)

1050 String Subtraction (20 分)哈希 map

摘要: 1050 String Subtraction (20 分) Given two strings S​1​​ and S​2​​, S=S​1​​−S​2​​ is defined to be the remaining string after taking all the characters 阅读全文
posted @ 2019-01-24 17:53 ZhangのBlog 阅读(203) 评论(0) 推荐(0)

1140 Look-and-say Sequence (20 分)简单模拟

摘要: 1140 Look-and-say Sequence (20 分) Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D 阅读全文
posted @ 2019-01-24 16:23 ZhangのBlog 阅读(203) 评论(0) 推荐(0)

1125 Chain the Ropes (25 分)排序

摘要: 1125 Chain the Ropes (25 分) Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into l 阅读全文
posted @ 2019-01-24 15:49 ZhangのBlog 阅读(197) 评论(0) 推荐(0)

1041 Be Unique 散列

摘要: pat甲级,散列 阅读全文
posted @ 2019-01-24 15:17 ZhangのBlog 阅读(102) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页