![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
larry6799
西安电子科技大学
展开
-
PAT 1022 Digital Library
A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...原创 2018-11-03 10:35:56 · 126 阅读 · 0 评论 -
pat A1005 Spell It Right
Given a non-negative integerN, your task is to compute the sum of all the digits ofN, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Eac...原创 2019-03-18 20:08:48 · 99 阅读 · 0 评论 -
pat A1001 A+B Format
Calculatea+band output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...原创 2019-03-18 19:45:08 · 117 阅读 · 0 评论 -
pat A1086 Tree Traversals Again
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stac...原创 2019-03-21 12:55:34 · 163 阅读 · 0 评论 -
pat A1052 Linked List Sorting
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integerkeyand aNextpointer to the next structure. Now give...原创 2019-03-17 13:51:57 · 121 阅读 · 0 评论 -
PAT A1032 Sharing
To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example,...原创 2019-03-17 12:17:29 · 97 阅读 · 0 评论 -
PAT 1071 Speech Patterns
People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help to narrow down a speake...原创 2018-11-02 15:37:19 · 148 阅读 · 0 评论 -
PAT 1054 The Dominant Color
Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called th...原创 2018-11-02 15:06:34 · 132 阅读 · 0 评论 -
PAT 1100 Mars Numbers
People on Mars count their numbers with base 13:Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earch is called "jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec" on Mars, ...原创 2018-11-02 14:44:35 · 86 阅读 · 0 评论 -
PAT 1120 Friend Numbers
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 = 5+1 = 6, and 6 is their ...原创 2018-11-02 02:14:28 · 97 阅读 · 0 评论 -
PAT 1051 Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence o...原创 2018-11-03 11:30:21 · 139 阅读 · 0 评论 -
pat A1042 Shuffling Machine
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler...原创 2019-03-18 22:19:17 · 89 阅读 · 0 评论