Advance Pat
文章平均质量分 83
烟蓑雨笠
这个作者很懒,什么都没留下…
展开
-
Pat(Advanced Level)Practice--1060(Are They Equal)
Pat1060代码题目描述:If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopping. Now given原创 2014-05-07 21:47:15 · 1024 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1057(Stack)
Pat1057代码题目描述: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 (inserting an element onto原创 2014-04-25 21:23:48 · 1486 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1026(Table Tennis)
Pat1026代码题目描述: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 when they arrive, they wil原创 2014-04-27 00:11:45 · 1785 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1069(The Black Hole of Numbers)
Pat1069代码原创 2014-04-11 22:38:22 · 894 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1070(Mooncake)
Pat1070代码题目描述:Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to th原创 2014-04-11 22:49:58 · 476 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1071(Speech Patterns)
Pat1071代码题目描述:People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help原创 2014-04-11 23:12:30 · 645 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1064(Complete Binary Search Tree)
Pat1064代码题目描述: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 t原创 2014-04-26 20:05:48 · 844 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1072(Gas Station)
Pat1072代码题目描述:A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must gu原创 2014-04-12 17:23:12 · 1026 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1067(Sort with Swap(0,*))
Pat1067代码题目描述:Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For e原创 2014-02-28 17:31:03 · 946 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1068(Find More Coins)
Pat1068代码题目描述: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 could accept all kinds of coi原创 2014-04-12 21:30:05 · 1028 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1073(Scientific Notation)
Pat1073代码原创 2014-04-12 21:36:10 · 595 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1016(Phone Bills)
Pat1016代码题目描述:A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day w原创 2014-05-11 20:00:01 · 1034 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1018(Public Bike Management)
Pat1018代码题目描述: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 an原创 2014-05-11 23:46:35 · 1310 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1046(Shortest Distance)
Pat1046代码题目描述:原创 2014-04-07 20:06:50 · 731 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1048(Find Coins)
Pat1048代码题目描述:原创 2014-04-07 21:04:57 · 642 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1049(Counting Ones)
Pat1049代码题目描述: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. For example, given N being原创 2014-04-07 21:23:44 · 663 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1077(Kuchiguse)
Pat1077代码题目描述:The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such原创 2014-03-26 19:51:38 · 723 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1059(Prime Factors)
Pat1059代码题目描述:Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km.Input Specification:Each input原创 2014-04-08 21:17:50 · 608 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1075(PAT Judge)
Pat1075代码题目描述:原创 2014-05-08 23:32:20 · 699 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1076(Forwards on Weibo)
Pat1076代码题目描述:Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with foll原创 2014-05-09 19:30:49 · 1158 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1017(Queueing at Bank)
Pat1017代码题目描述: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 customers have to wait in l原创 2014-05-09 22:02:00 · 818 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1051(Pop Sequence)
Pat1051代码题目描述:原创 2014-04-09 22:44:40 · 837 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1053(Path of Equal Weight)
Pat1053代码题目描述:Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to Lis defined to be the sum of the weights of all the nodes a原创 2014-04-10 21:19:08 · 1375 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1074(Reversing Linked List)
Pat1074代码题目描述:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must o原创 2014-04-12 21:39:19 · 751 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1045(Favorite Color Stripe)
Pat1045代码题目描述: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 those unwanted pieces and se原创 2014-05-12 23:11:01 · 1231 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1056(Mice and Rice)
Pat1021代码题目描述:原创 2014-04-25 19:04:27 · 997 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1089(Insert or Merge )
Pat1089代码题目描述:According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element原创 2015-01-09 23:59:20 · 903 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1090(Highest Price in Supply Chain)
Pat1090代码题目描述:A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supp原创 2015-01-10 00:03:49 · 1203 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1091(Acute Stroke)
Pat1091代码题目描述:One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI s原创 2015-01-10 00:09:15 · 857 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1098( Insertion or Heap Sort)
Pat1098代码题目描述:According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one el原创 2015-05-19 20:20:06 · 1274 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1095(Cars on Campus)
Pat1095代码题目描述:Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the info原创 2015-05-19 20:10:48 · 1440 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1093(Count PAT's)
Pat1093代码题目描述:The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and t原创 2015-05-19 20:04:48 · 860 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1092(To Buy or Not to Buy)
Pat1092代码题目描述:Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of原创 2015-05-19 20:01:40 · 609 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1096(Consecutive Factors)
Pat1096代码题目描述: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 consecu原创 2015-05-19 20:13:12 · 970 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1097(Deduplication on a Linked List)
Pat1097代码题目描述: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原创 2015-05-19 20:17:29 · 764 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1099(Build A Binary Search Tree )
Pat1099代码题目描述: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原创 2015-05-19 20:21:43 · 1094 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1088(Rational Arithmetic)
Pat1088代码题目描述:For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file原创 2015-01-09 23:51:58 · 732 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1087(All Roads Lead to Rome)
Pat1087代码题目描述:Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input S原创 2015-01-09 23:45:20 · 1243 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1042(Shuffling Machine)
Pat1042代码题目描述;原创 2014-04-26 19:24:10 · 693 阅读 · 0 评论 -
Pat(Advanced Level)Practice--1043(Is It a Binary Search Tree)
Pat1043代码题目描述: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 t原创 2014-05-14 00:24:28 · 1819 阅读 · 0 评论