自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

qiiingc的解题记录

2020年要考出PAT甲级的好成绩

  • 博客(70)
  • 资源 (1)
  • 收藏
  • 关注

原创 2020年9月PAT甲级满分必备刷题技巧

这份技巧帮你一网打尽所有的要点

2020-02-13 14:17:22 24291 22

原创 2020年7月第4题 PAT甲级真题 Replacement Selection (30分)

When the input is much too large to fit into memory, we have to do external sorting instead of internal sorting. One of the key steps in external sorting is to generate sets of sorted records (also called runs) with limited internal memory. The simplest me

2020-07-28 23:14:35 5146 7

原创 2020年7月第3题 PAT甲级真题 Safari Park (25分)

A safari park(野生动物园)has K species of animals, and is divided into N regions. The managers hope to spread the animals to all the regions, but not the same animals in the two neighboring regions. Of course, they also realize that this is an NP complete probl

2020-07-28 22:39:29 1931

原创 2020年7月第2题 PAT甲级真题 The Judger (25分)

A game of numbers has the following rules: at the beginning, two distinct positive integers are given by the judge. Then each player in turn must give a number to the judge. The number must be the difference of two numbers that are previously given, and mu

2020-07-28 22:32:13 2820 6

原创 2020年7月第1题 PAT甲级真题 Prime Day (20分)

The above picture is from Sina Weibo, showing May 23rd, 2019 as a very cool "Prime Day". That is, not only that the corresponding number of the date 20190523 is a prime, but all its sub-strings ended at the last digit 3 are prime numbers.Now your job i..

2020-07-28 03:44:16 1678

原创 【PAT甲级】排序题专题复习

1012 The Best Rank (25) 1025 PAT Ranking (25) 1028 List Sorting (25) 技巧:不要用string,原理上的解释我查不到,只知道姓名长度不同,比到短的就退了。测试结果是没有规律的,真的不能用。 char name[20];//不降序输出人名,strcmp就是ascii码左减右if(strcmp(a.name, b.name) == 0) return a.no < b.no;return strcmp(a...

2020-07-21 21:35:53 556 2

原创 【PAT甲级】1129 Recommendation System (25) 优化过的代码很简单

致谢:https://blog.csdn.net/liuchuo/article/details/68912867liuchuo代码的结构体初始化时的构造函数:node(int a, int b):value(a), cnt(b){}可以省略,我作了以下改动,也是满分代码。因为代码很简单,我在注释中注明注意事项。#include<iostream>#include<set>#include<algorithm>using namespace .

2020-07-19 23:41:13 202

原创 【PAT甲级】简单图论专题复习

难度一般:属于PAT甲级后两题里边比较简单的套路固定:图存储、顶点遍历、直接根据题意进行逻辑判断(一般来说用反证法的思路比较快)坑点:得对一些概念比较熟悉,根据题意进行足够多的判断才行:1.回路:起点和终点相同的路径称为回路。2.简单回路:除了第一个顶点和最后一个顶点相同外,其余顶点不重复出现的回路叫简单回路近三年真题相关题解:1154、1150、1142题库题解:1134、1126、1122...

2020-07-19 22:19:48 411

原创 【PAT甲级 简单图论】1122 Hamiltonian Cycle (25)

https://pintia.cn/problem-sets/994805342720868352/problems/994805351814119424The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle".In this problem, you are supposed to

2020-07-19 21:30:38 204

原创 【PAT甲级 简单图论】1126 Eulerian Path (25分)

https://pintia.cn/problem-sets/994805342720868352/problems/994805349851185152In 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

2020-07-19 21:16:34 203

原创 【PAT甲级】堆的专题复习

虽然《算法笔记》的9.7有介绍堆,1098题也是跟堆有关。但是在PAT甲级近三年的题目里,没考过向下调整、建堆写法,只了解到堆的概念就行。目前的考纲也没有明确地提到“堆”。近三年也就18年春季和18年冬季考过“堆”。近三年相关真题之前写过:1155、1147...

2020-07-19 17:24:58 302

原创 【PAT甲级】LCA专题复习

这个部分在《算法笔记》是没有的。这种新背景的题目,如果之前没有接触过,那只能从普通的定义去解,即:1.建树2.找祖先,找到一致的就是最低公共祖先例子:hihoCoder - 1062但是如果之前接触过,就能立即从递归的原理解:假设要查找LCA的结点:1.是父子,父节点就是LCA2.在目前根的左右,则目前的根就是LCA3.目前在根的同一侧,则目前的根设为该侧的子节点,继续递归真题:树、LCA 18秋第四题 1151 LCA in a Binary Tree

2020-07-10 23:47:33 465 1

原创 【PAT甲级】建树专题复习

建树有好几种不同的方法,都归纳在图里了。

2020-07-08 19:19:51 427

原创 【PAT甲级】Dijkstra专题复习

Dijkstra专题近三年考察情况:19年9月第四题...

2020-07-07 18:31:51 463 2

原创 【PAT甲级】并查集专题复习

会做多个复习的专题,会解释需要注意的基本概念和题库相关的满分代码展示。Dijkstra专题近三年考察情况:19年3月第三题

2020-07-07 17:59:07 452 1

原创 【超级简单但超级有用】让PDF书籍变身为可搜索文件

如果你要在好几本专业书籍里找关键字,但是因为没有书签,也不能对图片内进行文字搜索,束手无策之时,那就一定要用我这个办法

2020-05-27 16:33:08 1904 1

原创 【英语语法疑难点】An estimated后接个名词复数是个什么用法?

有个语法点不清楚,做错了题目,听了旋元佑老师的讲解才明白。结果一查发现网上有两个这样的问题没有解决。我就想来说一下。台湾大学研究所入学试题有这么一道:______ four hundred thousand Salvadorans entered the United States illegally between 1912 and 191 7.A. An estimateB. An estimatedC. An estimationD. An estimation of答案是..

2020-05-13 21:42:03 5459

原创 PAT甲级 1131 Subway Map (30分) 无向图的dfs + unordered_map的巧妙应用

#include <iostream>#include <vector>#include <unordered_map>using namespace std;vector<vector<int>> v(10000);//地铁线路图 v[a]是一维向量,存a的所有相邻节点int visit[10000];int minCnt...

2020-04-22 10:35:06 286 1

原创 训练PTA题目,建议你用这样的模拟时长

PTA,全称程序设计类实验辅助平台刷完一遍知识点,可以上压力模测来准备考试。新手版(刚抄了一遍代码,脑子仍旧迷糊)第一题 20分,时间 30分钟 第二题 25分,时间 40分钟 第三题 25分,时间 60分钟 第四题 30分,时间 80分钟过渡版(有些题很熟了,但是有些难啃的骨头真的难)第一题 20分,时间 20分钟 第二题 25分,时间 40分钟 第三题 25分,时间...

2020-04-06 20:11:43 881 1

原创 PAT甲级 1130 Infix Expression 25分 dfs

题目来源https://pintia.cn/problem-sets/994805342720868352/problems/994805347921805312分析详解:https://www.liuchuo.net/archives/3798本站类似题目(方法一样):https://blog.csdn.net/allisonshing/article/details/10064...

2020-04-06 12:16:06 135

原创 PAT甲级 1129 Recommendation System 25分 set和结构体操作符重载

//16/25分struct node{ int no,times=0;};bool cmp(node &a,node &b){ return a.times==b.times?a.no<b.no:a.times>b.times;}int main(){ int n,m,x; scanf("%d ...

2020-04-06 11:42:35 156

原创 PAT甲级 1128 N Queens Puzzle (20分) 巧妙的set利用

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805348915855360备考汇总贴:2020年6月PAT甲级满分必备刷题技巧方法只要判断对角线和行有没有重合的就可以,set的size()很有用。给出的(列,行)求和如果相同,在同一条对角线上。#include<iostrea...

2020-04-05 14:19:40 143

原创 17年春季第三题 PAT甲级 1134 Vertex Cover (25分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805346428633088备考汇总贴:2020年6月PAT甲级满分必备刷题技巧Avertex coverof a graph is a set of vertices such that each edge of the graph is incid...

2020-03-28 00:10:14 603 1

原创 17年秋季第四题 PAT甲级 1139 First Contact (30分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805343043829760备考汇总贴:2020年6月PAT甲级满分必备刷题技巧Unlike in nowadays, the way that boys and girls expressing their feelings of love was qu...

2020-03-17 00:13:18 908 5

原创 数据结构与算法题目集 7-34 任务调度的合理性 (25分)

这道题属于准备PAT甲级时对拓扑排序的一道加练题。题目来源:https://pintia.cn/problem-sets/15/problems/861备考汇总贴:2020年6月PAT甲级满分必备刷题技巧假定一个工程项目由一组子任务构成,子任务之间有的可以并行执行,有的必须在完成了其它一些子任务后才能执行。“任务调度”包括一组子任务、以及每个子任务可以执行所依赖的子任务集。比如完成...

2020-03-17 00:06:19 878

原创 PAT甲级数据结构类技术总结

本篇文章专门汇总特别需要注意的数据结构,将说明每种数据结构的引入和具体用法。

2020-03-15 00:27:06 2949 3

原创 18年春季第三题 PAT甲级 1146 Topological Order (25分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805343043829760备考汇总贴:2020年6月PAT甲级满分必备刷题技巧This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is...

2020-03-14 12:58:01 783 1

原创 18年冬季第三题 PAT甲级 1154 Vertex Coloring (25分) 两种思路

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/1071785301894295552备考汇总贴:2020年3月PAT甲级满分必备刷题技巧Aproper vertex coloringis a labeling of the graph's vertices with colors such that no...

2020-03-11 19:36:30 962

原创 17年春季第四题 PAT甲级 1135 Is It A Red-Black Tree (30)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805346063728640备考汇总贴:2020年3月PAT甲级满分必备刷题技巧There is a kind of balanced binary search tree namedred-black treein the data structur...

2020-03-10 21:04:56 905

原创 17年秋季第三题 PAT甲级 1138 Postorder Traversal (25分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805345078067200备考汇总贴:2020年3月PAT甲级满分必备刷题技巧Suppose that all the keys in a binary tree are distinct positive integers. Given the pre...

2020-03-09 22:40:32 679 3

原创 【解决报错】java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

IDE:IntelliJ IDEA Ultimate 2019.3 (我用的是学生版,只要大学邮箱能用就可以的)报错信息全文附在最后。其中关键的信息就是:Root Causejava.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)解决方法1.首先,如果项目是你...

2020-03-05 23:00:21 28666 4

原创 17年冬季第四题 PAT甲级 1143 Lowest Common Ancestor(30分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805343727501312备考汇总贴:2020年3月PAT甲级满分必备刷题技巧题目The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node ...

2020-03-02 22:12:38 807

原创 18年秋季第四题 PAT甲级 1151 LCA in a Binary Tree (30分)

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/1038430130011897856备考汇总贴:2020年3月PAT甲级满分必备刷题技巧题目The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node...

2020-03-01 23:25:16 1002

原创 19年春季第四题 PAT甲级 1159 Structure of a Binary Tree(30分)

汇总贴2020年3月PAT甲级满分必备刷题技巧题目Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, a binary tree can be uniquely determined....

2020-02-24 23:25:45 1518 8

原创 17年秋季第三题 PAT甲级 1142 Maximal Clique (25分)

汇总贴2020年3月PAT甲级满分必备刷题技巧题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805343979159552Acliqueis a subset of vertices of an undirected graph such that every two distinct ve...

2020-02-24 12:26:36 680

原创 18年冬季第四题 PAT甲级 1155 Heap Paths (30分)

题目题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/1071785408849047552In computer science, aheapis a specialized tree-based data structure that satisfies the heap property: if P i...

2020-02-22 21:36:44 882 6

原创 18年春季第四题 PAT甲级 1147 Heaps (30分) 可以不建树

题目来源:https://pintia.cn/problem-sets/994805342720868352/problems/994805342821531648In computer science, aheapis a specialized tree-based data structure that satisfies the heap property: if P is a...

2020-02-21 20:48:12 870 1

原创 18秋第三题 PAT甲级 1150 Travelling Salesman Problem (25分) 简单图论

题目The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and ...

2020-02-20 23:44:24 710 3

原创 19春第三题 PAT甲级 1158 Telefraud Detection (25分) 用这个方法最好

题目Telefraud(电信诈骗) remains a common and persistent problem in our society. In some cases, unsuspecting victims lose their entire life savings. To stop this crime, you are supposed to write a program ...

2020-02-17 17:03:35 1790 16

原创 17秋第二题 PAT甲级 1137 Final Grading (25分) 给的规则有点多

题目For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/she must first obtain no less than 200 points ...

2020-02-17 16:53:17 649

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除