随笔分类 -  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 cus 阅读全文

posted @ 2020-04-28 11:49 刘好念 阅读(7) 评论(0) 推荐(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, 阅读全文

posted @ 2020-03-24 22:31 刘好念 阅读(8) 评论(0) 推荐(0) 编辑

[PAT]1091 Acute Stroke (30分)(样例5未过原因)
摘要:一、题目: 略 二、分析 使用BFS。 三、代码 #include <iostream> #include <vector> #include <queue> using namespace std; int M, N, L, T; struct core { bool value; bool vi 阅读全文

posted @ 2020-03-23 22:00 刘好念 阅读(2) 评论(0) 推荐(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. 阅读全文

posted @ 2020-03-22 23:14 刘好念 阅读(5) 评论(0) 推荐(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 cus 阅读全文

posted @ 2019-11-27 16:26 刘好念 阅读(5) 评论(0) 推荐(0) 编辑

[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 n 阅读全文

posted @ 2019-09-09 21:58 刘好念 阅读(8) 评论(0) 推荐(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 n 阅读全文

posted @ 2019-09-01 09:47 刘好念 阅读(3) 评论(0) 推荐(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 if Swap(0, *) is the ONLY operatio 阅读全文

posted @ 2019-08-31 21:07 刘好念 阅读(7) 评论(0) 推荐(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 w 阅读全文

posted @ 2019-08-31 11:29 刘好念 阅读(9) 评论(0) 推荐(0) 编辑

[PAT]1101 Quick Sort (25 分)(样例2段错误原因)
摘要:一、题意 There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Th 阅读全文

posted @ 2019-08-30 18:58 刘好念 阅读(5) 评论(0) 推荐(0) 编辑

[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 an 阅读全文

posted @ 2019-08-15 10:54 刘好念 阅读(2) 评论(0) 推荐(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 阅读全文

posted @ 2019-08-14 20:33 刘好念 阅读(1) 评论(0) 推荐(0) 编辑

[PAT]1148 Werewolf - Simple Version(20 分)
摘要:这是2018年9月8日PAT考试甲级第一题,当时看完题目什么思路也没有,就直接跳过做第二题(因为我看第二题还好多人做出来了)。最后终于有了思路,但是读题题意理解错了,原文是"at least one but not all the werewolves were lying"即只有一个狼人说谎,自己 阅读全文

posted @ 2018-09-11 15:38 刘好念 阅读(8) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示