摘要: Description Yesterday your dear cousin Coach Pang gave you a new 100MB hard disk drive (HDD) as a gift because you will get married next year. But yo... 阅读全文
posted @ 2014-05-05 21:21 t-tay-y 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Description Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows: int a, b, c, d, e, f;int fn( int n ) { if( ... 阅读全文
posted @ 2014-05-05 21:15 t-tay-y 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少? 已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整... 阅读全文
posted @ 2014-05-05 21:02 t-tay-y 阅读(359) 评论(0) 推荐(0) 编辑