PAT1050 String Subtraction (20分) 用布尔数组
Given two strings S1 and S2 , S=S1 −S2 is defined to be the remaining string after taking all the characters in S2 from S1 . Your task is simply to calculate S1 −S2 for any given strings.
PAT1040 Longest Symmetric String (25分) 中心扩展法+动态规划
Given a string, you are supposed to output the length of the longest symmetric sub-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 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).