2013年8月30日
摘要: Time Limit:1000MSMemory Limit:10000KTotal Submissions:8571Accepted:2997DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important for us.There 阅读全文
posted @ 2013-08-30 16:51 straw_berry 阅读(210) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1080题意:已知一个人类基因的积分表,给出两个字符串,计算这两个串的最大相似程度;思路:最长公共子序列的变形,用score[][] 表示积分值,dp[i][j]表示字符串s1[1,2,,,i]和s2[1,2,,,j]的分值,对一个dp[i][j],有三种可能:> s1取第i个字符,s2取‘-’时,dp[i][j] = dp[i-1][j] + score[s1[i]][0];>s1取‘-’,s2取第j个字符时,dp[i][j] = dp[i][j-1] + score[0][s2[j]];>s1取第i个字符,s2取第j个字 阅读全文
posted @ 2013-08-30 15:30 straw_berry 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Time Limit:3000MSMemory Limit:65536KTotal Submissions:48526Accepted:16674DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal number of characters 阅读全文
posted @ 2013-08-30 09:37 straw_berry 阅读(232) 评论(0) 推荐(0) 编辑