PAT1042 Shuffling Machine (20分) 用1-54代替点数更方便哦
PAT1042 Shuffling Machine (20分) 用1-54代替点数更方便哦
|
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ automatic shuffling machines.
PAT 1041 Be Unique (20分)利用数组找出只出现一次的数字
PAT 1041 Be Unique (20分)利用数组找出只出现一次的数字
|
Being unique is so important to people on Mars that even their lottery is designed in a unique way.
PAT1040 Longest Symmetric String (25分) 中心扩展法+动态规划
PAT1040 Longest Symmetric String (25分) 中心扩展法+动态规划
|
Given a string, you are supposed to output the length of the longest symmetric sub-string.
PAT 1039 Course List for Student (25分) 使用map(string, vector(int))
PAT 1039 Course List for Student (25分) 使用map(string, vector(int))
|
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes for a query.
PAT 1038 Recover the Smallest Number (30分) string巧排序
PAT 1038 Recover the Smallest Number (30分) string巧排序
|
Given a collection of number segments, you are supposed to recover the smallest number from them.
PAT 1037 Magic Coupon (25分) 贪心+排序+负负/正正得正
PAT 1037 Magic Coupon (25分) 贪心+排序+负负/正正得正
|
The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product back!
PAT 1036 Boys vs Girls (25分) 比大小而已
PAT 1036 Boys vs Girls (25分) 比大小而已
|
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.
PAT 1035 Password (20分) 字符替换
PAT 1035 Password (20分) 字符替换
|
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) from O (o in uppercase).
PAT 1034 Head of a Gang (30分) 图的连通分量 + DFS
PAT 1034 Head of a Gang (30分) 图的连通分量 + DFS
|
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 and B, we say that A and B is related.