![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
文章平均质量分 89
负反馈循环
这个作者很懒,什么都没留下…
展开
-
PAT 甲级 2021 秋季满分经验贴
首先 diss 一波浙软今年 9.10 通知机试不能用其他成绩代替的操作。再说这次考试,可能也是因为这个成绩不能代替机试,今年秋季的考试难度明显比前几年秋季低,不过还是能看出来今年的题目有些考验心态的意思:第一题是最难的(如果不了解前几年考题的话很容易在第一题上失去自信);图的题目放到了第三题,树的题目放到了最后一题,而且对我来说还第四题还涉及到了一个新的概念,再加上做这道题的时候整个人的状态都不好(肚子不舒服),所以这道题还是卡了一会的。就像我上面第一条说的,往年的第一题都不是最简单的,我看.原创 2021-09-13 22:12:06 · 1754 阅读 · 3 评论 -
PAT-2021年秋季考试 - 甲级 7-4 Sorted Cartesian Tree (C++)
A Sorted Cartesian tree is a tree of (key, priority) pairs. The tree is heap-ordered according to the priority values, and an inorder traversal gives the keys in sorted order. For example, given the pairs { (55, 8), (58, 15), (62, 3), (73, 4), (85, 1), (88原创 2021-09-13 21:39:04 · 618 阅读 · 1 评论 -
PAT-2021年秋季考试 - 甲级 7-3 Playground Exploration (C++)
A playground is equipped with ball pits and tents connected by tunnels. Kids can crawl through the tunnels to meet their friends at a spot with a tent or a ball pit.Now let’s mark each meeting spot (a tent or a ball pit) by a number. Assume that once a k.原创 2021-09-13 21:31:06 · 468 阅读 · 0 评论 -
PAT-2021年秋季考试 - 甲级 7-2 Stack of Hats (C++)
PATers believe that wearing hats makes them look handsome, so wherever they go, everyone of them would wear a hat. One day they came to a restaurant, a waiter collected their hats and piled them up. But then when they were ready to leave, they had to face.原创 2021-09-13 21:26:14 · 821 阅读 · 0 评论 -
PAT-2021年秋季考试 甲级 7-1 Arrays and Linked Lists (C++)
Let’s design a data structure AAA that combines arrays and linked lists as the following:At the very beginning, an integer array A0A_0A0 of length L0L_0L0 is initialized for the user. When the user tries to access the iiith element A[i]A[i]A[i], if 0≤i&原创 2021-09-13 21:12:48 · 675 阅读 · 0 评论 -
PAT(甲级)2019年秋季考试 7-1 Forever (C++)
“Forever number” is a positive integer AAA with KKK digits, satisfying the following constrains:the sum of all the digits of AAA is mmm;the sum of all the digits of A+1A+1A+1 is nnn; andthe greatest common divisor of mmm and nnn is a prime number which原创 2021-09-09 20:39:36 · 125 阅读 · 0 评论 -
PAT(甲级)2019年秋季考试 7-4 Dijkstra Sequence (C++)
Dijkstra’s algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the shortest paths from one particular source vertex to all the other vertices of the given graph. It was conceived原创 2021-09-09 20:31:17 · 169 阅读 · 0 评论 -
PAT(甲级)2019年秋季考试 7-3 Postfix Expression (C++)
Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, with parentheses reflecting the precedences of the operators.Input Specification:Each input file contains one test case. For each case, the first line gives a原创 2021-09-09 20:23:46 · 169 阅读 · 0 评论 -
PAT(甲级)2019年秋季考试 7-2 Merging Linked Lists (C++)
Given two singly linked lists L1=a1→a2→⋯→an−1→anL_1=a_1→a_2→⋯→a_{n−1}→a_nL1=a1→a2→⋯→an−1→an and L2=b1→b2→⋯→bm−1→bmL_2=b_1→b_2→⋯→b_{m−1}→b_mL2=b1→b2→⋯→bm−1→bm. If n≥2mn≥2mn≥2m, you are supposed to reverse and merge the shorter one into the longer原创 2021-09-09 20:19:55 · 230 阅读 · 0 评论 -
PAT(甲级)2020年秋季考试 7-4 Professional Ability Test (C++)
Professional Ability Test (PAT) consists of several series of subject tests. Each test is divided into several levels. Level A is a prerequisite (前置要求) of Level B if one must pass Level A with a score no less than SSS in order to be qualified to take Level原创 2021-09-08 21:22:14 · 444 阅读 · 0 评论 -
PAT(甲级)2020年秋季考试 7-3 Left-View of Binary Tree (C++)
The left-view of a binary tree is a list of nodes obtained by looking at the tree from left hand side and from top down. For example, given a tree shown by the figure, its left-view is { 1, 2, 3, 4, 5 }Given the inorder and preorder traversal sequences o原创 2021-09-08 20:06:11 · 237 阅读 · 0 评论 -
PAT(甲级)2020年秋季考试 7-2 How Many Ways to Buy a Piece of Land (C++)
The land is for sale in CyberCity, and is divided into several pieces. Here it is assumed that each piece of land has exactly two neighboring pieces, except the first and the last that have only one. One can buy several contiguous(连续的) pieces at a time. No原创 2021-09-08 20:03:32 · 133 阅读 · 0 评论 -
PAT(甲级)2020年秋季考试 7-1 Panda and PP Milk (C++)
PP milk (盆盆奶)is Pandas’ favorite. They would line up to enjoy it as show in the picture. On the other hand, they could drink in peace only if they believe that the amount of PP milk is fairly distributed, that is, fatter panda can have more milk, and the .原创 2021-09-08 19:59:48 · 129 阅读 · 0 评论