摘要: 11613675CKboss1159Accepted792K1110MSG++635B2013-05-19 15:51:30#include #include #include using namespace std;int dp[2][5555];int main(){ char s1[5555],s2[5555]; s1[0]=s2[0]=':'; int n; cin... 阅读全文
posted @ 2013-05-19 23:53 码代码的猿猿 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Humble NumbersTime Limit:1000MSMemory Limit:65536KTotal Submissions:8704Accepted:4115DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first... 阅读全文
posted @ 2013-05-19 21:15 码代码的猿猿 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 实质是:求一个字符串与其逆字符串的LCS.LCS用short int开数组刚好可以卡着内存过!!! PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:46566Accepted:15910DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are... 阅读全文
posted @ 2013-05-19 21:14 码代码的猿猿 阅读(183) 评论(0) 推荐(0) 编辑
摘要: The TriangleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 32637Accepted: 19322Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a pro... 阅读全文
posted @ 2013-05-19 21:05 码代码的猿猿 阅读(158) 评论(0) 推荐(0) 编辑
摘要: LIS:维护一个单调的队列新的元素,如果大于队尾元素,即插入队尾否则二分查找比它大的最小元素,替换掉最后队列长度即为LIS的解1 3 7 5 9 4 811 31 3 71 3 51 3 5 91 3 4 91 3 4 8 Longest Ordered SubsequenceTime Limit:2000MSMemory Limit:65536KTotal Submissions:26637Accepted:11611DescriptionA numeric sequence ofaiis ordered ifa1<a... 阅读全文
posted @ 2013-05-19 14:15 码代码的猿猿 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1,按大小顺序帮最小2,dp[i][j] 前 i 件物品搬 j 对3,dp[i][j]=min(dp[i-1][j],dp[i-2][j-1]+POW2(a[i-1],a[i]);4,dp[i][i>>1]=dp[i-2][i>>1-1]+POW2(a[i-1],a[i]);搬寝室Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12181Accepted Submission(s): 4074Problem Descri 阅读全文
posted @ 2013-05-19 12:43 码代码的猿猿 阅读(281) 评论(0) 推荐(0) 编辑