原创 A1001 A+B Format (20分)

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by co

原创 3 由Partition&荷蘭國旗問題引出的快速排序(QuickSort)

由Partition&荷蘭國旗問題引出的快速排序(QuickSort) Partition問題: 給定一個數組arrarrarr,和一個數numnumnum,請把小於numnumnum的數放在數組的左邊,大於numnumnum的數

原创 A1035 Password (20分)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are a

原创 A1012 The Best Rank (25分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C -

原创 A1022 Digital Library (30分)

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

原创 A1006 Sign In and Sign Out (25分)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one w

原创 A1020 Tree Traversals (25分)

Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal se

原创 A1009 Product of Polynomials (25分)

This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contain

原创 A1013 Battle Over Cities (25分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all

原创 A1027 Colors in Mars (20分)

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is repres

原创 A1030 Travel Plan (30分)

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

原创 More Effective C++ 基礎議題(Basics)

基礎議題 條款1:仔細區別pointers和references ​ 沒有所謂的null reference,但可以有null pointer,這個事實意味着使用reference可能會比使用pointers更有效率(不需要測試其

原创 A1025 PAT Ranking (25分)

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. E

原创 A1015 Reversible Primes (20分)

A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example i

原创 A1002 A+B for Polynomials (25分)

This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contain