随笔分类 -  PAT

摘要:题目 A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer k 阅读全文
posted @ 2020-07-04 08:33 无代码,非程序 阅读(112) 评论(0) 推荐(0)
摘要:题目 Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a give 阅读全文
posted @ 2020-07-03 21:33 无代码,非程序 阅读(162) 评论(0) 推荐(0)
摘要:题目 Given two strings S​1​​ and S​2​​ , S=S​1​​ −S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​ . Your 阅读全文
posted @ 2020-07-03 19:25 无代码,非程序 阅读(96) 评论(0) 推荐(0)
摘要:题目 The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N 阅读全文
posted @ 2020-07-03 17:33 无代码,非程序 阅读(128) 评论(0) 推荐(0)
摘要:题目 Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which 阅读全文
posted @ 2020-07-03 11:25 无代码,非程序 阅读(111) 评论(0) 推荐(0)
摘要:题目 Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to outpu 阅读全文
posted @ 2020-07-03 08:48 无代码,非程序 阅读(186) 评论(0) 推荐(0)
摘要:题目 The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair o 阅读全文
posted @ 2020-07-02 22:07 无代码,非程序 阅读(85) 评论(0) 推荐(0)
摘要:题目 Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off 阅读全文
posted @ 2020-07-02 19:14 无代码,非程序 阅读(149) 评论(0) 推荐(0)
摘要:题目 Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When maki 阅读全文
posted @ 2020-07-02 10:42 无代码,非程序 阅读(195) 评论(0) 推荐(0)
摘要:题目 A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nod 阅读全文
posted @ 2020-06-14 18:45 无代码,非程序 阅读(167) 评论(0) 推荐(0)
摘要:题目 Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid " 阅读全文
posted @ 2020-06-11 15:36 无代码,非程序 阅读(145) 评论(0) 推荐(0)
摘要:题目 Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a nu 阅读全文
posted @ 2020-06-11 13:28 无代码,非程序 阅读(165) 评论(0) 推荐(0)
摘要:题目 Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest sy 阅读全文
posted @ 2020-06-10 23:37 无代码,非程序 阅读(225) 评论(0) 推荐(0)
摘要:题目 Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output t 阅读全文
posted @ 2020-06-10 22:31 无代码,非程序 阅读(198) 评论(0) 推荐(0)
摘要:题目 Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, w 阅读全文
posted @ 2020-06-10 21:25 无代码,非程序 阅读(130) 评论(0) 推荐(0)
摘要:题目 The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a pro 阅读全文
posted @ 2020-06-10 16:35 无代码,非程序 阅读(153) 评论(0) 推荐(0)
摘要:题目 This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. 阅读全文
posted @ 2020-06-02 16:39 无代码,非程序 阅读(160) 评论(0) 推荐(0)
摘要:题目 To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwor 阅读全文
posted @ 2020-06-01 13:55 无代码,非程序 阅读(200) 评论(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 阅读全文
posted @ 2020-05-31 13:26 无代码,非程序 阅读(186) 评论(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 ga 阅读全文
posted @ 2020-05-30 16:56 无代码,非程序 阅读(260) 评论(0) 推荐(0)