Feature:PAT真题练习
@kidultff

PAT-A 真题 – 1067 Sort with Swap(0, i)

Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2, 1, 3} w ...
  • 0
  • 0
@kidultff

PAT-A 真题 - 1062. Talent and Virtue

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a "sage( ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1063 Set Similarity

Given two sets of integers, the similarity of the sets is defined to be Nc/Nt×100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of distinct numbers ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1155 Heap Paths

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or le ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1154 Vertex Coloring

A proper vertex coloring is a labeling of the graph's vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k colors is called a (proper) k ...
  • 0
  • 0