![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
ZZ --瑞 hopeACMer
WA就完事了
展开
-
A - 祝
在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input 输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字...原创 2019-02-05 19:44:37 · 278 阅读 · 0 评论 -
F
There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it thatstarts in the upper left cell of the matrix;each following cell is to the right or do...转载 2019-02-13 20:49:40 · 101 阅读 · 0 评论 -
B
电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 Input 多组数据。对于每组数据: 第一行...原创 2019-02-13 19:22:46 · 147 阅读 · 0 评论 -
D
Once Petya read a problem about a bracket sequence. He gave it much thought but didn’t find a solution. Today you will face it.You are given string s. It represents a correct bracket sequence. A corr...转载 2019-02-07 20:54:02 · 95 阅读 · 0 评论 -
G
It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in identif...转载 2019-02-05 21:32:58 · 107 阅读 · 0 评论 -
B
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 ...转载 2019-02-05 21:29:11 · 113 阅读 · 0 评论 -
F
Pirates have finished developing the typing software. He called Cathy to test his typing software. She is good at thinking. After testing for several days, she finds that if she types a string by some...转载 2019-02-05 21:07:44 · 150 阅读 · 0 评论 -
E
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, …, xm> another sequence Z = <z1, z2, …, zk> is a subseque...原创 2019-02-05 20:43:26 · 228 阅读 · 0 评论 -
C
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of...转载 2019-02-05 20:33:18 · 83 阅读 · 0 评论