原创 【PAT】1095. Cars on Campus (30)

Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate nu

原创 【PAT】1030. Travel Plan (30)

A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now yo

原创 【PAT】1014. Waiting in Line (30)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waitin

原创 【PAT】 1076. Forwards on Weibo (30)

Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other

原创 【PAT】1080. Graduate Admission (30)

It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang P

原创 【PAT】1091. Acute Stroke (30)

One important factor to identify acute stroke (急性腦卒中) is the volume of the stroke core. Given the results of image ana

原创 【PAT】1068. Find More Coins (30)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a u

原创 【PAT】1053. Path of Equal Weight (30)

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 L

原创 【PAT】1018. Public Bike Management (30)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the wor

原创 【PAT】1087. All Roads Lead to Rome (30)

Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route

原创 【PAT】1038. Recover the Smallest Number (30)

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {

原创 【PAT】1086. Tree Traversals Again (25)

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that whe

原创 【PAT】1022. Digital Library (30)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts,

原创 【PAT】1057. Stack (30)

Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The

原创 【PAT】1049. Counting Ones (30)

The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal for