摘要: CoinsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6450Accepted Submission(s): 2628Problem Descr... 阅读全文
posted @ 2014-05-13 19:21 仰望天kong 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Crossword AnswersTime Limit:1000MSMemory Limit:30000KTotal Submissions:869Accepted:405DescriptionA crossword puzzle consists of a rectangular grid of ... 阅读全文
posted @ 2014-05-05 21:07 仰望天kong 阅读(445) 评论(0) 推荐(0) 编辑
摘要: Monkey and BananaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6866 Accepted Submission(s): 351... 阅读全文
posted @ 2014-04-29 12:01 仰望天kong 阅读(771) 评论(0) 推荐(0) 编辑
摘要: 问题 G: 多少个0时间限制: 1 Sec内存限制: 128 MB提交: 192解决: 40题目描述一个n*n的方格,每个格子中间有一个数字是2或者5,现在从方格的左上角走到右下角,每次只能选择向下或者向右移动一格两种移动方式,让所有经过的格子中的数字相乘,求使最后的结果中末尾处0的数字最少。输入第... 阅读全文
posted @ 2014-04-23 19:08 仰望天kong 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 命运Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8488Accepted Submission(s): 2991Problem Descript... 阅读全文
posted @ 2014-04-22 13:32 仰望天kong 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Advanced FruitsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1426Accepted Submission(s): 719Special JudgeProblem Description The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from on 阅读全文
posted @ 2014-04-03 20:07 仰望天kong 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 最长公共上升子序列慕名而知是两个字符串a,b的最长公共递增序列,不一定非得是连续的。刚开始看到的时候想的是先用求最长公共子序列,然后再从其中找到最长递增子序列,可是仔细想一想觉得这样有点不妥,然后从网上看了一些大神的理解,觉得恍然大悟。 定义dp[i][j]表示字符串a前i个和字符串b的前j个且以b[j]结尾构成的最长公共上升子序列的长度,定义一个max用来保存最大的长度。用两个循环,外层循环控制字符串a,内层循环控制字符串b。如果a[i]不等于b[j],则dp[i][j]=dp[i-1][j];如果a[i]大于b[j]而且max 2 using namespace std; 3 int... 阅读全文
posted @ 2014-04-02 21:59 仰望天kong 阅读(483) 评论(0) 推荐(0) 编辑
摘要: JosephTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1512Accepted Submission(s): 948Problem DescriptionThe Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . 阅读全文
posted @ 2014-04-01 20:54 仰望天kong 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Sum It UpTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3538Accepted Submission(s): 1788Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4 阅读全文
posted @ 2014-03-30 16:30 仰望天kong 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22750Accepted Submission(s): 7659Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能 阅读全文
posted @ 2014-03-27 13:14 仰望天kong 阅读(129) 评论(0) 推荐(0) 编辑