【置顶】【PAT】PAT甲级题目及分类总结(持续更新ing)

在2019年3月底,我决定考浙大计院,经过一个月还算凑合的学习,痛定思痛,决定整理整理自己的博客。
粗略估计,大概一个月的时间里我AC了31道题,大概用时40个小时上下,毕竟还要把大部分时间花在笔试上。一开始使用Java,到十几题的时候发现有的题真的Java很难通过,痛定思痛转Cpp。这里告诫读者,千万换Cpp而不是继续Java,毕竟我们的目标是满分。
我在算法题上有点小基础,前后两次参加蓝桥杯,小成绩就不说了。
说下对于网上的题解的一点小看法吧,当然各位前辈都比我厉害的多,冒昧说下个人的看法。
首先是在代码风格上,柳婼的代码风格我很喜欢,非常精简而清晰。大家如果搜索一些OJ题目,会发现网上有很多代码,但是大部分代码仅仅是保证了正确性,在可读性方面,大部分真的比较糟糕。这个可能是做工程比较少的人的通病。我认为算法题也是要讲究代码规范的,毕竟你不一定一上来就AC掉,如果写出来的代码可读性差,自己修改都很难受。
其次是对于题目,大部分仅仅满足于AC,我认为首先要尽量做到一题多解,其次是综合考虑算法效率和代码可读性。尽量追求程序效率当时是算法本身的目的,但是从功利的角度看我们要的是分数,同样AC的代码,可读性或者说更方便书写的代码显然对于拿分这个目的更有力。
大部分代码我都是自己完成的,少部分(大概5、6道题)参考了别人的代码,如果代码或者思路参考了别人的,我会在文章里给出链接,主要参考了:
柳婼的博客
前辈的代码真的不错。
对于题目,我将按序号和分类两种方式进行整理。有基础的朋友可以按顺序解题,这样相当于反复循环各个考点。基础比较薄弱的分类型攻克,再留最后几套题做模拟
对于每道题,尽量做到一题多解并注重代码可读性

PAT总结

  • PAT总结《考前经验贴》
  • PAT总结《语法篇》
  • PAT总结《模拟篇》
  • PAT总结《数学篇》
  • PAT总结《散列、排序、二分、贪心》
  • PAT总结《搜索、打表、分治、排序算法、队列、栈、堆、Hash》
  • PAT总结《树、并查集》
  • PAT总结《图论、动态规划》

按题序

题目 考察点
A1001 A+B Format 数字相加格式化输出 简单模拟
A1002 A+B for Polynomials 多项式相加 简单模拟
A1003 Emergency 救援最短路径和最大救援部队 Dijkstra算法
A1004 Counting Leaves DFS
A1005 Spell It Right 字符串处理
A1006 Sign In and Sign Out 简单模拟
A1007 Maximum Subsequence Sum 动态规划
A1008 Elevator 简单模拟
A1009 Product of Polynomials 多项式乘法 简单模拟
A1010 Radix 进制转换、二分查找
A1011 World Cup Betting 简单模拟
A1012 The Best Rank 排序
A1013 Battle Over Cities DFS
A1014 Waiting in Line 快乐模拟
A1015 Reversible Primes 进制转换、素数判定
A1016 Phone Bills 排序
A1017 Queueing at Bank 快乐模拟
A1018 Public Bike Management Dijkstra算法、DFS
A1019 General Palindromic Number 进制转换
A1020 Tree Traversals 树的遍历、DFS
A1021 Deepest Root 树的遍历、树的深度、DFS
A1022 Digital Library Map的使用
A1023 Have Fun with Numbers 大整数乘法、排列组合
A1024 Palindromic Number 大整数加法
A1024 Palindromic Number 大整数
A1025 PAT Ranking 排序
A1026 Table Tennis 快乐模拟
A1027 Colors in Mars 进制转换
A1028 List Sorting 排序
A1029 Median 中位数
A1030 Travel Plan Dijkstra算法
A1031 Hello World for U 图形输出
A1032 Sharing 链表
A1033 To Fill or Not to Fill 贪心
A1034 Head of a Gang 并查集
A1035 Password 字符串处理
A1036 Boys vs Girls 最大、最小值
A1037 Magic Coupon 贪心
A1038 Recover the Smallest Number 贪心
A1039 Course List for Student Map的使用
A1040 Longest Symmetric String 最长回文子串
A1041 Be Unique 散列表
A1042 Shuffling Machine 简单模拟
A1043 Is It a Binary Search Tree
A1044 Shopping in Mars 二分查找
A1045 Favorite Color Stripe 最长不下降子序列
A1046 Shortest Distance 简单模拟
A1047 Student List for Course Map的使用
A1048 Find Coins 散列
A1050 String Subtraction 散列
A1051 Pop Sequence
A1052 Linked List Sorting 链表
A1053 Path of Equal Weight
A1054 The Dominant Color Map的使用
A1055 The World’s Richest 排序
A1056 Mice and Rice 队列
A1057 Stack 分块
A1058 A+B in Hogwarts 进制转换
A1059 Prime Factors 素数
A1060 Are They Equal 数字处理
A1061 Dating 字符串处理
A1062 Talent and Virtue 排序
A1063 Set Similarity Set的使用
A1064 Complete Binary Search Tree
A1065 A+B and C (64bit) 简单模拟
A1066 Root of AVL Tree AVL树
A1067 Sort with Swap(0, i) 贪心
A1068 Find More Coins 0-1背包
A1069 The Black Hole of Numbers 数字处理
A1070 Mooncake 贪心
A1071 Speech Patterns 字符串处理
A1072 Gas Station Dijkstra算法
A1073 Scientific Notation 数字处理
A1074 Reversing Linked List 链表
A1075 PAT Judge 排序
A1076 Forwards on Weibo BFS
A1077 Kuchiguse 字符串处理
A1078 Hashing hash
A1079 Total Sales of Supply Chain 广义树
A1080 Graduate Admission 排序
A1081 Rational Sum 最大公因数
A1082 Read Number in Chinese 字符串处理(细节比较复杂)
A1083 List Grades 排序
A1084 Broken Keyboard 散列
A1085 Perfect Sequence 二分查找
A1086 Tree Traversals Again
A1087 All Roads Lead to Rome Dijkstra算法
A1088 Rational Arithmetic 最大公因数
A1089 Insert or Merge 插入排序、归并排序
A1090 Highest Price in Supply Chain 广义树
A1091 Acute Stroke DFS、BFS
A1092 To Buy or Not to Buy 散列
A1093 Count PAT’s 排列组合
A1094 The Largest Generation 广义树
A1095 Cars on Campus 排序
A1096 Consecutive Factors 因数分解
A1097 Deduplication on a Linked List 链表、散列
A1098 Insertion or Heap Sort 插入排序、堆排序
A1099 Build A Binary Search Tree
A1100 Mars Numbers 打表
A1101 Quick Sort 快速排序主元的选取
A1102 Invert a Binary Tree
A1103 Integer Factorization DFS
A1104 Sum of Number Segments 排列组合
A1106 Lowest Price in Supply Chain 广义树
A1107 Social Clusters 并查集
A1108 Finding Average 数字处理
A1109 Group Photo 排队问题
A1110 Complete Binary Tree 完全二叉树
A1111 Online Map Dijkstra算法
A1112 Stucked Keyboard 字符串处理
A1113 Integer Set Partition 贪心
A1114 Family Property 并查集
A1115 Counting Nodes in a BST
A1116 Come on! Let’s C 素数
A1117 Eddington Number 排序
A1118 Birds in Forest 并查集
A1120 Friend Numbers 散列
A1121 Damn Single 散列
A1122 Hamiltonian Cycle 哈密顿圈的判别
A1123 Is It a Complete AVL Tree AVL树、完全二叉树
A1124 Raffle for Weibo Followers 简单模拟
A1125 Chain the Ropes 贪心
A1126 Eulerian Path 欧拉图的判别
A1127 ZigZagging on a Tree
A1128 N Queens Puzzle 八皇后问题
A1129 Recommendation System 排序
A1130 Infix Expression 广义树
A1132 Cut Integer 数字处理
A1133 Splitting A Linked List 链表
A1134 Vertex Cover
A1135 Is It A Red-Black Tree
A1136 A Delayed Palindrome 大整数加法
A1138 Postorder Traversal
A1139 First Contact 快乐模拟
A1140 Look-and-say Sequence 字符串处理
A1141 PAT Ranking of Institutions 排序
A1142 Maximal Clique
A1143 Lowest Common Ancestor LCA
A1144 The Missing Number 散列
A1145 Hashing - Average Search Time hash
A1146 Topological Order 拓扑序列的判别
A1147 Heaps 堆的判定
A1148 Werewolf - Simple Version 枚举
A1149 Dangerous Goods Packaging 散列
A1150 Travelling Salesman Problem 中国邮递员问题
A1151 LCA in a Binary Tree LCA
A1152 Google Recruitment 素数判定
A1153 Decode Registration Card of PAT 排序
A1154 Vertex Coloring
A1155 Heap Paths 堆的判定

按类型

题目 考察点
A1008 Elevator 简单模拟
A1006 Sign In and Sign Out 简单模拟
A1036 Boys vs Girls 简单模拟
A1011 World Cup Betting 简单模拟
A1124 Raffle for Weibo Followers 简单模拟
A1042 Shuffling Machine 简单模拟
A1046 Shortest Distance 简单模拟
A1065 A+B and C (64bit) 简单模拟
A1054 The Dominant Color Map的使用
A1039 Course List for Student Map的使用
A1047 Student List for Course Map的使用
A1063 Set Similarity Set的使用
A1022 Digital Library Map的使用
A1140 Look-and-say Sequence 字符串处理
A1005 Spell It Right 字符串处理
A1035 Password 字符串处理
A1077 Kuchiguse 字符串处理
A1112 Stucked Keyboard 字符串处理
A1071 Speech Patterns 字符串处理
A1061 Dating 字符串处理
A1082 Read Number in Chinese 字符串处理(细节比较复杂)
A1031 Hello World for U 图形输出
A1109 Group Photo 排队问题
A1014 Waiting in Line 快乐模拟
A1017 Queueing at Bank 快乐模拟
A1026 Table Tennis 快乐模拟
A1139 First Contact 快乐模拟
A1132 Cut Integer 数字处理
A1069 The Black Hole of Numbers 数字处理
A1073 Scientific Notation 数字处理
A1108 Finding Average 数字处理
A1060 Are They Equal 数字处理
A1001 A+B Format 数字相加格式化输出 数字处理
A1002 A+B for Polynomials 多项式相加 多项式加法
A1009 Product of Polynomials 多项式乘法 多项式除法
A1029 Median 中位数
A1027 Colors in Mars 进制转换
A1019 General Palindromic Number 进制转换
A1058 A+B in Hogwarts 进制转换
A1010 Radix 进制转换、二分查找
A1104 Sum of Number Segments 排列组合
A1093 Count PAT’s 排列组合
A1148 Werewolf - Simple Version 枚举
A1048 Find Coins 枚举
A1023 Have Fun with Numbers 大整数加法
A1024 Palindromic Number 大整数加法
A1136 A Delayed Palindrome 大整数加法
A1081 Rational Sum 最大公因数
A1088 Rational Arithmetic 最大公因数
A1015 Reversible Primes 进制转换、素数
A1152 Google Recruitment 素数判定
A1059 Prime Factors 素数
A1116 Come on! Let’s C 素数
A1096 Consecutive Factors 因数分解
A1120 Friend Numbers 散列
A1121 Damn Single 散列
A1050 String Subtraction 散列
A1084 Broken Keyboard 散列
A1041 Be Unique 散列
A1092 To Buy or Not to Buy 散列
A1144 The Missing Number 散列
A1149 Dangerous Goods Packaging 散列
A1128 N Queens Puzzle 八皇后问题
A1012 The Best Rank 排序
A1028 List Sorting 排序
A1095 Cars on Campus 排序
A1016 Phone Bills 排序
A1025 PAT Ranking 排序
A1062 Talent and Virtue 排序
A1055 The World’s Richest 排序
A1083 List Grades 排序
A1141 PAT Ranking of Institutions 排序
A1117 Eddington Number 排序
A1080 Graduate Admission 排序
A1113 Integer Set Partition 排序
A1129 Recommendation System 排序
A1075 PAT Judge 排序
A1153 Decode Registration Card of PAT 排序
A1070 Mooncake 贪心
A1113 Integer Set Partition 贪心
A1037 Magic Coupon 贪心
A1125 Chain the Ropes 贪心
A1038 Recover the Smallest Number 贪心
A1067 Sort with Swap(0, i) 贪心
A1033 To Fill or Not to Fill 贪心
A1100 Mars Numbers 打表
A1085 Perfect Sequence 二分查找
A1044 Shopping in Mars 二分查找
A1089 Insert or Merge 插入排序、归并排序
A1098 Insertion or Heap Sort 插入排序、堆排序
A1101 Quick Sort 快速排序主元的选取
A1051 Pop Sequence
A1056 Mice and Rice 队列
A1074 Reversing Linked List 链表
A1032 Sharing 链表
A1133 Splitting A Linked List 链表
A1052 Linked List Sorting 链表
A1097 Deduplication on a Linked List 链表、散列
A1076 Forwards on Weibo BFS
A1103 Integer Factorization DFS
A1091 Acute Stroke DFS、BFS
A1004 Counting Leaves DFS
A1013 Battle Over Cities DFS
A1147 Heaps 堆的判定
A1155 Heap Paths 堆的判定
A1078 Hashing hash
A1145 Hashing - Average Search Time hash
A1020 Tree Traversals 树的遍历、DFS
A1021 Deepest Root 树的遍历、树的深度、DFS
A1079 Total Sales of Supply Chain 广义树
A1090 Highest Price in Supply Chain 广义树
A1106 Lowest Price in Supply Chain 广义树
A1094 The Largest Generation 广义树
A1130 Infix Expression 广义树
A1086 Tree Traversals Again
A1102 Invert a Binary Tree
A1053 Path of Equal Weight
A1064 Complete Binary Search Tree
A1043 Is It a Binary Search Tree
A1099 Build A Binary Search Tree
A1127 ZigZagging on a Tree
A1115 Counting Nodes in a BST
A1138 Postorder Traversal
A1110 Complete Binary Tree 完全二叉树
A1143 Lowest Common Ancestor LCA
A1151 LCA in a Binary Tree LCA
A1135 Is It A Red-Black Tree 红黑树判定
A1066 Root of AVL Tree AVL树
A1123 Is It a Complete AVL Tree AVL树、完全二叉树
A1107 Social Clusters 并查集
A1118 Birds in Forest 并查集
A1034 Head of a Gang 并查集
A1114 Family Property 并查集
A1134 Vertex Cover
A1122 Hamiltonian Cycle 哈密顿圈的判别
A1126 Eulerian Path 欧拉图的判别
A1142 Maximal Clique
A1150 Travelling Salesman Problem 中国邮递员问题
A1146 Topological Order 拓扑序列的判别
A1003 Emergency 救援最短路径和最大救援部队 Dijkstra算法
A1072 Gas Station Dijkstra算法
A1087 All Roads Lead to Rome Dijkstra算法
A1030 Travel Plan Dijkstra算法
A1018 Public Bike Management Dijkstra算法、DFS
A1111 Online Map Dijkstra算法
A1057 Stack 分块
1007 Maximum Subsequence Sum 动态规划
A1045 Favorite Color Stripe 最长不下降子序列
A1040 Longest Symmetric String 最长回文子串
A1068 Find More Coins 0-1背包

你可能感兴趣的:(PAT)