PAT1050 String Subtraction (20分) 用布尔数组
PAT1050 String Subtraction (20分) 用布尔数组
|
Given two strings S​1​​ and S​2​​ , S=S​1​​ −S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​ . Your task is simply to calculate S1​​​ −S​2​​ for any given strings.
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 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 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).