随笔分类 -  PAT

上一页 1 2 3 4 5 6 下一页
PAT 甲级 1079 Total Sales of Supply Chain (25 分)(简单,不建树,bfs即可)
摘要:1079 Total Sales of Supply Chain (25 分) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in mo 阅读全文
posted @ 2019-12-04 15:17 蔡军帅 阅读(394) 评论(0) 推荐(0)
PAT 甲级 1078 Hashing (25 分)(简单,平方二次探测)
摘要:1078 Hashing (25 分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of 阅读全文
posted @ 2019-12-04 15:11 蔡军帅 阅读(342) 评论(0) 推荐(0)
PAT 甲级 1077 Kuchiguse (20 分)(简单,找最大相同后缀)
摘要:1077 Kuchiguse (20 分) The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as 阅读全文
posted @ 2019-12-04 15:08 蔡军帅 阅读(228) 评论(0) 推荐(0)
PAT 甲级 1147 Heaps (30 分) (层序遍历,如何建树,后序输出,还有更简单的方法~)
摘要:1147 Heaps (30 分) 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, 阅读全文
posted @ 2019-11-20 17:20 蔡军帅 阅读(291) 评论(2) 推荐(0)
PAT 甲级 1146 Topological Order (25 分)(拓扑较简单,保存入度数和出度的节点即可)
摘要:1146 Topological Order (25 分) This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtaine 阅读全文
posted @ 2019-11-20 17:02 蔡军帅 阅读(286) 评论(0) 推荐(0)
PAT 甲级 1145 Hashing - Average Search Time (25 分)(读不懂题,也没听说过平方探测法解决哈希冲突。。。感觉题目也有点问题)
摘要:1145 Hashing - Average Search Time (25 分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. 阅读全文
posted @ 2019-11-20 16:34 蔡军帅 阅读(494) 评论(0) 推荐(0)
PAT 甲级 1144 The Missing Number (20 分)(简单,最后一个测试点没过由于开的数组没必要大于N)
摘要:1144 The Missing Number (20 分) Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specifica 阅读全文
posted @ 2019-11-20 16:21 蔡军帅 阅读(390) 评论(0) 推荐(0)
PAT 甲级 1074 Reversing Linked List (25 分)(链表部分逆置,结合使用双端队列和栈,其实使用vector更简单呐)
摘要:1074 Reversing Linked List (25 分) Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For e 阅读全文
posted @ 2019-11-18 22:28 蔡军帅 阅读(498) 评论(0) 推荐(0)
PAT 甲级 1073 Scientific Notation (20 分) (根据科学计数法写出数)
摘要:1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation ma 阅读全文
posted @ 2019-11-13 23:28 蔡军帅 阅读(443) 评论(0) 推荐(0)
PAT 甲级 1072 Gas Station (30 分)(dijstra)
摘要:1072 Gas Station (30 分) A gas station has to be built at such a location that the minimum distance between the station and any of the residential hous 阅读全文
posted @ 2019-11-10 17:29 蔡军帅 阅读(432) 评论(0) 推荐(0)
PAT 甲级 1071 Speech Patterns (25 分)(map)
摘要:1071 Speech Patterns (25 分) People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others ma 阅读全文
posted @ 2019-11-06 18:54 蔡军帅 阅读(274) 评论(0) 推荐(0)
PAT 甲级 1070 Mooncake (25 分)(结构体排序,贪心,简单)
摘要:1070 Mooncake (25 分) 1070 Mooncake (25 分) 1070 Mooncake (25 分) Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival 阅读全文
posted @ 2019-10-31 13:07 蔡军帅 阅读(295) 评论(0) 推荐(0)
PAT 甲级 1069 The Black Hole of Numbers (20 分)(内含别人string处理的精简代码)
摘要:1069 The Black Hole of Numbers (20 分) 1069 The Black Hole of Numbers (20 分) 1069 The Black Hole of Numbers (20 分) For any 4-digit integer except the o 阅读全文
posted @ 2019-10-31 12:51 蔡军帅 阅读(285) 评论(0) 推荐(0)
PAT 甲级 1068 Find More Coins (30 分) (dp,01背包问题记录最佳选择方案)***
摘要:1068 Find More Coins (30 分) 1068 Find More Coins (30 分) 1068 Find More Coins (30 分) Eva loves to collect coins from all over the universe, including s 阅读全文
posted @ 2019-10-29 23:12 蔡军帅 阅读(363) 评论(0) 推荐(0)
PAT 甲级 1067 Sort with Swap(0, i) (25 分)(贪心,思维题)*
摘要:1067 Sort with Swap(0, i) (25 分) 1067 Sort with Swap(0, i) (25 分) 1067 Sort with Swap(0, i) (25 分) Given any permutation of the numbers {0, 1, 2,...,  阅读全文
posted @ 2019-10-26 22:16 蔡军帅 阅读(522) 评论(0) 推荐(0)
PAT 甲级 1066 Root of AVL Tree (25 分)(快速掌握平衡二叉树的旋转,内含代码和注解)***
摘要:1066 Root of AVL Tree (25 分) 1066 Root of AVL Tree (25 分) 1066 Root of AVL Tree (25 分) An AVL tree is a self-balancing binary search tree. In an AVL t 阅读全文
posted @ 2019-10-25 22:58 蔡军帅 阅读(474) 评论(0) 推荐(0)
PAT 甲级 1065 A+B and C (64bit) (20 分)(溢出判断)*
摘要:1065 A+B and C (64bit) (20 分) 1065 A+B and C (64bit) (20 分) 1065 A+B and C (64bit) (20 分) Given three integers A, B and C in [−], you are supposed to 阅读全文
posted @ 2019-10-08 20:44 蔡军帅 阅读(202) 评论(0) 推荐(0)
PAT 甲级 1064 Complete Binary Search Tree (30 分)(不会做,重点复习,模拟中序遍历)
摘要:1064 Complete Binary Search Tree (30 分) 1064 Complete Binary Search Tree (30 分) 1064 Complete Binary Search Tree (30 分) A Binary Search Tree (BST) is 阅读全文
posted @ 2019-10-08 20:29 蔡军帅 阅读(291) 评论(0) 推荐(0)
PAT 甲级 1063 Set Similarity (25 分) (新学,set的使用,printf 输出%,要%%)
摘要:1063 Set Similarity (25 分) 1063 Set Similarity (25 分) 1063 Set Similarity (25 分) Given two sets of integers, the similarity of the sets is defined to 阅读全文
posted @ 2019-09-29 18:15 蔡军帅 阅读(222) 评论(0) 推荐(0)
PAT 甲级 1062 Talent and Virtue (25 分)(简单,结构体排序)
摘要:1062 Talent and Virtue (25 分) 1062 Talent and Virtue (25 分) 1062 Talent and Virtue (25 分) About 900 years ago, a Chinese philosopher Sima Guang wrote 阅读全文
posted @ 2019-09-26 17:57 蔡军帅 阅读(222) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 下一页