Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
理解题意// For some letters substitute letter may coincide with the original letter. // For example, applying substitution cipher that changes all letters from 'A' to 'Y' to // the next ones in the alphabet, and changes 'Z' to 'A', to the message "VICTORIOUS" // one gets the message "WJDUPSJPVT". // // 题目仅仅是举例说明:替代时候如何建立关联而已,举了个相差1的例子罢了。 // // 这句话前面的那句才是关键:Substitutes for all letters must be different. // 只要替代的时候保持一一映射就行了。 // // 而permutation就是把这种一一映射后的字符串换换位置,无关痛痒。 // 所以,解题的思路就是根据这种一一映射的关系,也即只要只要两数组的字母频度数组一样就行。 // 说的更清楚点:频度为1的字母个数一样,频度为2的字母个数一样…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator