pat
矢澤 年
宅女
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT (Advanced Level) Practice 1122 Hamiltonian Cycle(25 分)
1122 Hamiltonian Cycle(25 分)The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle".In this problem, you are supp...原创 2018-08-29 11:19:30 · 279 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1121 Damn Single(25 分)
1121 Damn Single(25 分)"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input S...原创 2018-08-29 11:14:16 · 294 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1120 Friend Numbers(20 分)
1120 Friend Numbers(20 分)Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are friend numbers since 1+2+3...原创 2018-08-29 11:11:56 · 212 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1119 Pre- and Post-order Traversals(30 分)
1119 Pre- and Post-order Traversals(30 分)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder tr...原创 2018-08-31 09:59:43 · 264 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1118 Birds in Forest(25 分)
1118 Birds in Forest(25 分)Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the ...原创 2018-08-31 09:53:15 · 255 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1117 Eddington Number(25 分)
1117 Eddington Number(25 分)British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum int...原创 2018-08-31 09:50:39 · 264 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1116 Come on! Let's C
1116 Come on! Let's C(20 分)"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejiang University. Since the idea of the contest is for fun,...原创 2018-08-31 09:45:25 · 310 阅读 · 0 评论 -
1135 Is It A Red-Black Tree 1135 Is It A Red-Black Tree(30 分)
1135 Is It A Red-Black Tree(30 分)There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties:(1) Every node is either red or black....原创 2018-08-28 11:13:11 · 542 阅读 · 0 评论 -
PAT (Advanced Level) Practice 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. Now given a graph with several vertex sets, you ...原创 2018-08-28 11:07:26 · 347 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1133 Splitting A Linked List
1133 Splitting A Linked List(25 分)Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in...原创 2018-08-28 11:03:06 · 233 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1132 Cut Integer
1132 Cut Integer(20 分)Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B ...原创 2018-08-28 10:55:44 · 333 阅读 · 0 评论 -
To Fill or Not to Fill
To Fill or Not to Fill Time Limit...原创 2018-07-28 13:16:20 · 205 阅读 · 0 评论 -
B 1003.我要通过
1003. 我要通过!(20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于PAT的“答案正确”大派送 —— 只要读入的字符串原创 2017-02-23 14:18:32 · 548 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1123 Is It a Complete AVL Tree(30 分)
1123 Is It a Complete AVL Tree(30 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they d...原创 2018-08-29 11:49:58 · 233 阅读 · 0 评论
分享