随笔分类 -  PAT

1 2 3 4 5 ··· 9 下一页
摘要:解题的过程中有时候,根据题目的要求我们很难去自己实现一种满足题意的数据结构,但是如果我们对STL库比较熟悉的话,可以通过改写里面的一些库函数,从而满足题意的要求。在做题的过程中常见的一些方法主要是对小于号<进行改写。 对set中的<进行改写和对priority_queue中的<进行改写,主要是对这两 阅读全文 »
posted @ 2020-07-23 20:02 Veritas_des_Liberty 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2020-07-13 12:14 Veritas_des_Liberty 阅读(232) 评论(0) 推荐(0) 编辑
摘要:Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each 阅读全文 »
posted @ 2020-07-12 17:44 Veritas_des_Liberty 阅读(323) 评论(0) 推荐(0) 编辑
摘要:自从使用了C++就不再想使用C语言来刷题了,C++便捷的输入输出方式,以及一些STL库函数的使用都要比使用C语言方便的多。但是使用的时候还有一些需要注意的地方,在这篇博客中写一下。(更好的教程可以参看柳神写的那个,我这个主要是写一下自己在算题的过程中一些经常使用,但是还经常容易忘记的进行一些总结) 阅读全文 »
posted @ 2020-06-30 21:35 Veritas_des_Liberty 阅读(386) 评论(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) 编辑

1 2 3 4 5 ··· 9 下一页
点击右上角即可分享
微信分享提示