PAT
文章平均质量分 87
Jivan2233
一个又在努力准备复试的考研学生。
展开
-
1010. Radix (25)(java版)
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is “yes”, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integ原创 2017-12-02 20:19:03 · 236 阅读 · 0 评论 -
1100. Mars Numbers (20)
People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars. The numbers 1 to 12 on Earch is called “jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec” on Mars,原创 2018-01-23 10:59:52 · 117 阅读 · 0 评论 -
1099. Build A Binary Search Tree (30)
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 with keys less than the node’s key. The right su原创 2018-01-22 13:12:32 · 115 阅读 · 0 评论 -
1098. Insertion or Heap Sort (25)
According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. At each iteration, insertion sort removes one element from the input da原创 2018-01-21 15:35:15 · 123 阅读 · 0 评论 -
1097. Deduplication on a Linked List (25)
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or a原创 2018-01-21 10:47:37 · 187 阅读 · 0 评论 -
1013. Battle Over Cities (25)(java版)
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 city are closed. We must know immediately if we need原创 2017-12-06 20:01:59 · 416 阅读 · 2 评论 -
1018. Public Bike Management (30)(java版)
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 station and return it to any other stations in the c原创 2017-12-05 21:14:58 · 371 阅读 · 0 评论 -
1003. 我要通过!(20)(java版)
这个PAT栏目就记录一些我用java实现的PAT上的题,有甲级的有乙级的,但并不是所有的题都记录,因为有些题确实没有记录的意义,我就记录一些我感觉有一些价值或者不太好理解的题,有时我不会的题,我会转载一些解题方法,希望可以帮助到大家。我第一道被难住的题,我根本没想到我会这么快被一道题难住,毕竟我以前已经用C++把PAT乙级做过一遍了(其实一部分是看别人的代码)。题目:“答案正确”是自动判题系统给出的原创 2017-11-21 19:44:02 · 948 阅读 · 5 评论 -
1003. Emergency (25)(java版)
题目: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 roads. Amount of rescue teams in each city and the原创 2017-11-22 19:59:48 · 596 阅读 · 0 评论 -
1096. Consecutive Factors (20)
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now given原创 2018-01-20 20:51:01 · 174 阅读 · 0 评论