PAT(A) 1124. Raffle for Weibo Followers (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1124

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 -- that is, he

继续阅读


PAT(A) 1123. Is It a Complete AVL Tree (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1123

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

继续阅读


PAT(A) 1122. Hamiltonian Cycle (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1122

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 supposed to tell if a given cycle is

继续阅读


PAT(A) 1121. Damn Single (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1121

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 Specification:

继续阅读


PAT(A) 1120. Friend Numbers (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1120

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

继续阅读


PAT(A) 1119. Pre- and Post-order Traversals (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1119

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

继续阅读


PAT(A) 1118. Birds in Forest (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1118

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.

继续阅读


PAT(A) 1117. Eddington Number(25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1117

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",

继续阅读


PAT(A) 1116. Come on! Let's C (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1116

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, the award rules are funny as the following:

继续阅读


PAT(A) 1111. Online Map (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1111

1111. Online Map (30)


Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is guaranteed that a path exists for

继续阅读


Powered by Django 2. Copyright © 2014.

huchengbei.com. All rights reserved.