dp
文章平均质量分 85
FinkyS
finding my own sky
展开
-
POJ - 2479 《Maximum sum》 【线性DP】
Description求一个数列中两个不相交的子段和,要求和最大,输出最大值。InputThe input consists of T(Each test case contains two lines. The first line is an integer n(2OutputPrint exactly one line for each test case原创 2013-07-19 20:18:10 · 372 阅读 · 0 评论 -
SPOJ - 2325 【String Distance】 【dp、剪枝】
DescriptionLet A = a1a2...ak and B = b1b2...bl be strings of lengths k and l, respectively. The string distance between A and B is defined in the following way (d[i,j] is the distance of substring原创 2013-07-22 18:16:26 · 419 阅读 · 0 评论