随笔分类 -  PAT甲

摘要:As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2019-03-01 17:56 Johnny、 阅读(203) 评论(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 cou 阅读全文
posted @ 2019-03-01 00:51 Johnny、 阅读(608) 评论(0) 推荐(0)
摘要:Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push ( 阅读全文
posted @ 2019-02-28 02:12 Johnny、 阅读(449) 评论(0) 推荐(1)
摘要: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 @ 2019-02-28 00:14 Johnny、 阅读(201) 评论(0) 推荐(0)
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2019-02-27 17:56 Johnny、 阅读(118) 评论(0) 推荐(0)
摘要:According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-02-27 01:32 Johnny、 阅读(203) 评论(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 th 阅读全文
posted @ 2019-02-26 16:40 Johnny、 阅读(256) 评论(0) 推荐(0)
摘要:An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any 阅读全文
posted @ 2019-02-25 02:38 Johnny、 阅读(358) 评论(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 nodes 阅读全文
posted @ 2019-02-25 01:23 Johnny、 阅读(193) 评论(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 nodes 阅读全文
posted @ 2019-02-24 17:47 Johnny、 阅读(276) 评论(0) 推荐(0)
摘要:When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A socia 阅读全文
posted @ 2019-02-24 14:38 Johnny、 阅读(217) 评论(0) 推荐(0)
摘要:The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program t 阅读全文
posted @ 2019-02-22 10:30 Johnny、 阅读(178) 评论(0) 推荐(0)
摘要:Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given 阅读全文
posted @ 2019-02-19 02:28 Johnny、 阅读(294) 评论(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 the 阅读全文
posted @ 2019-02-03 19:25 Johnny、 阅读(209) 评论(0) 推荐(0)