06 2020 档案

摘要:自从使用了C++就不再想使用C语言来刷题了,C++便捷的输入输出方式,以及一些STL库函数的使用都要比使用C语言方便的多。但是使用的时候还有一些需要注意的地方,在这篇博客中写一下。(更好的教程可以参看柳神写的那个,我这个主要是写一下自己在算题的过程中一些经常使用,但是还经常容易忘记的进行一些总结) 阅读全文 »
posted @ 2020-06-30 21:35 Veritas_des_Liberty 阅读(386) 评论(0) 推荐(0) 编辑
摘要:在刷题的过程中,有时候会遇到一些数据结构中的一些概念,如果对这些概念理解不清楚,甚至理解有误的话,就很可能把题目做错。所以,专门找出在刷题过程中出现的一些概念,以免考试的时候用到想不起来。 拓扑排序 1. 每个顶点出现且只出现一次 2. 若顶点A在序列中排在顶点B的前面,则在图中不存在从顶点B到顶点 阅读全文 »
posted @ 2020-06-30 09:02 Veritas_des_Liberty 阅读(327) 评论(0) 推荐(0) 编辑
摘要:在刷题的过程中经常会碰到一些关于图论的问题,下面我将根据自己刷题的经验来对这些问题做一个总结。 图的表示方法 解决图论中的问题首先要解决的问题就是图的表示方法这一问题,图的表示方法主要有两种,一种使用链接表的方法来表示,另一种是用链接矩阵的方法来表示。在解题的过程中我用的几乎都是用邻接矩阵的方法来表 阅读全文 »
posted @ 2020-06-27 16:47 Veritas_des_Liberty 阅读(400) 评论(0) 推荐(0) 编辑
摘要:关于时间的模拟问题 在刷题的过程中碰到了一些关于时间先后顺序的模拟题目,刚开始做的时候确实挺麻烦的,今天把这类问题的解题思路来整理一下。 比较典型的有: 1017 Queueing at Bank 1026 Table Tennis 因为这两道题的题号比较靠前,可能在PAT考试中不会考这样的题目,但 阅读全文 »
posted @ 2020-06-26 16:37 Veritas_des_Liberty 阅读(194) 评论(0) 推荐(0) 编辑
摘要:今天是6月26日到下个月的这个时候已经考过试了,为了让自己考一个更高的分数,所以我打算把PAT的相关题型做一个总结。目前想到的方法就是将相关的题型整理到一起然后,针对这种题型整理出一些方法。 二叉树的构建 有很多题目需要自己构造一棵二叉树有的是给出层序遍历的结果然后自己来构造二叉树,有的是给出二叉树 阅读全文 »
posted @ 2020-06-26 16:21 Veritas_des_Liberty 阅读(288) 评论(0) 推荐(0) 编辑
摘要:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re 阅读全文 »
posted @ 2020-06-24 17:56 Veritas_des_Liberty 阅读(197) 评论(0) 推荐(0) 编辑
摘要:A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi 阅读全文 »
posted @ 2020-06-24 17:30 Veritas_des_Liberty 阅读(185) 评论(0) 推荐(0) 编辑
摘要:Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the c 阅读全文 »
posted @ 2020-06-24 15:22 Veritas_des_Liberty 阅读(189) 评论(0) 推荐(0) 编辑
摘要:There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any s 阅读全文 »
posted @ 2020-06-23 16:09 Veritas_des_Liberty 阅读(236) 评论(0) 推荐(0) 编辑
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文 »
posted @ 2020-06-22 18:00 Veritas_des_Liberty 阅读(189) 评论(0) 推荐(0) 编辑
摘要:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou 阅读全文 »
posted @ 2020-06-22 17:09 Veritas_des_Liberty 阅读(174) 评论(0) 推荐(0) 编辑
摘要:A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the 阅读全文 »
posted @ 2020-06-21 21:22 Veritas_des_Liberty 阅读(229) 评论(0) 推荐(0) 编辑
摘要:A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文 »
posted @ 2020-06-19 15:37 Veritas_des_Liberty 阅读(271) 评论(0) 推荐(0) 编辑
摘要:Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文 »
posted @ 2020-06-19 14:29 Veritas_des_Liberty 阅读(230) 评论(0) 推荐(0) 编辑
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文 »
posted @ 2020-06-18 16:22 Veritas_des_Liberty 阅读(174) 评论(0) 推荐(0) 编辑
摘要:Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文 »
posted @ 2020-06-18 15:08 Veritas_des_Liberty 阅读(160) 评论(0) 推荐(0) 编辑
摘要:A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open 阅读全文 »
posted @ 2020-06-17 16:42 Veritas_des_Liberty 阅读(271) 评论(0) 推荐(0) 编辑
摘要:People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文 »
posted @ 2020-06-17 15:09 Veritas_des_Liberty 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Excel can sort records according to any column. Now you are supposed to imitate this function. Input Specification: Each input file contains one test 阅读全文 »
posted @ 2020-06-16 17:13 Veritas_des_Liberty 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 1 阅读全文 »
posted @ 2020-06-16 16:33 Veritas_des_Liberty 阅读(136) 评论(0) 推荐(0) 编辑
摘要:A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra 阅读全文 »
posted @ 2020-06-15 16:15 Veritas_des_Liberty 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Given any string of N (≥) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as: h d e l l r 阅读全文 »
posted @ 2020-06-15 14:48 Veritas_des_Liberty 阅读(166) 评论(0) 推荐(0) 编辑
摘要:To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same s 阅读全文 »
posted @ 2020-06-14 16:59 Veritas_des_Liberty 阅读(165) 评论(0) 推荐(0) 编辑
摘要:With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s 阅读全文 »
posted @ 2020-06-13 23:48 Veritas_des_Liberty 阅读(216) 评论(0) 推荐(0) 编辑
摘要:One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is re 阅读全文 »
posted @ 2020-06-05 18:10 Veritas_des_Liberty 阅读(195) 评论(0) 推荐(0) 编辑

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