![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
刘好念
这个作者很懒,什么都没留下…
展开
-
[PAT]1106 Lowest Price in Supply Chain (25分)(样例3,6,7未通过原因)
一、题目A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone o...原创 2020-04-28 11:49:20 · 245 阅读 · 0 评论 -
[PAT]1096 Consecutive Factors (20分)(样例3、5、6未过原因)
一、题目Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, and 7 are the three consecutive numbers. Now g...原创 2020-03-24 22:31:21 · 290 阅读 · 0 评论 -
[PAT]1091 Acute Stroke (30分)(样例5未过原因)
一、题目:One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job i...原创 2020-03-23 22:00:46 · 193 阅读 · 0 评论 -
[PAT]1103 Integer Factorization (30分)
1103 Integer Factorization (30分)一、题目The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K...原创 2020-03-22 23:14:37 · 268 阅读 · 0 评论 -
[PAT]1079 Total Sales of Supply Chain (25 分)(样例2、3、5、6未过原因)
一、题意A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone...原创 2019-11-27 16:26:12 · 263 阅读 · 3 评论 -
[PAT]1043 Is It a Binary Search Tree (25 分)
一、题意A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The ri...原创 2019-09-09 21:58:41 · 240 阅读 · 0 评论 -
[PAT]1064 Complete Binary Search Tree (30 分)
一、题意A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The ri...原创 2019-09-01 09:47:54 · 164 阅读 · 0 评论 -
[PAT]1067 Sort with Swap(0, i) (25 分)(运行超时解决办法)
一、题意Given any permutation of the numbers {0, 1, 2,...,N−1}, it is easy to sort them in increasing order. But what ifSwap(0, *)is the ONLY operation that is allowed to use? For example, to sort {4...原创 2019-08-31 21:07:20 · 284 阅读 · 0 评论 -
[PAT]1126 Eulerian Path (25 分)(样例3答案错误原因)
一、题意In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which starts and ends on the same vertex. They wer...原创 2019-08-31 11:29:44 · 449 阅读 · 0 评论 -
[PAT]1101 Quick Sort (25 分)(样例2段错误原因)
一、题意There is a classical process namedpartitionin the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to ...原创 2019-08-30 18:58:57 · 419 阅读 · 2 评论 -
[PAT]1119 Pre- and Post-order Traversals (30 分)(样例1未过,运行时错误原因)
一、题目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 traversal sequences, or preorder and in...原创 2019-08-15 10:54:00 · 348 阅读 · 0 评论 -
[PAT]1099 Build A Binary Search Tree (30 分)(只得22分的原因)
一、题目:A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The r...原创 2019-08-14 20:33:13 · 202 阅读 · 2 评论 -
[PAT]1148 Werewolf - Simple Version(20 分)
这是2018年9月8日PAT考试甲级第一题,当时看完题目什么思路也没有,就直接跳过做第二题(因为我看第二题还好多人做出来了)。最后终于有了思路,但是读题题意理解错了,原文是"at least one but not all the werewolves were lying"即只有一个狼人说谎,自己当时理解了,要么只有一个狼人说谎,要么没狼人说谎,最后提交只过了一个"No Solution"样例,...原创 2018-09-11 15:38:30 · 312 阅读 · 0 评论