原创 PAT 1072 Gas Station

A gas station has to be built at such a location that the minimum distance between the station and any of the residenti

原创 PAT 1046 Shortest Distance

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest

原创 PAT 1017 Queueing at Bank

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

原创 PAT 1036 Boys vs Girls

This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade

原创 PAT 1034 Head of a Gang

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 a

原创 PAT 1117 Eddington Number

British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined

原创 PAT 1147

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a pare

原创 1148 Werewolf - Simple Version

Werewolf(狼人殺) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Sup

原创 PAT 1039 Course List for Student

問題描述: Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the cou

原创 PAT 1022 Digital Library

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

原创 PAT 1152 Google Recruitment

題目描述: In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below)

原创 PAT 1131 Subway Map

In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following fig

原创 PAT 1149 Dangerous Goods Packaging

When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container,

原创 PAT 1145 Hashing - Average Search Time

  The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try

原创 PAT 1111 Online Map

  題目要求: Input our current position and a destination, an online map can recommend several paths. Now your job is to rec