区间dp
文章平均质量分 93
Hold_My_Own
When the dust settles, and it will, we'll see.
展开
-
(CSU - 1592)石子归并
(CSU - 1592)石子归并Time Limit: 1 Sec 现在有n堆石子,第i堆有ai个石子。现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数。求合并所有石子的最小代价。Input第一行包含一个整数T(T<=50),原创 2017-08-21 17:19:21 · 348 阅读 · 0 评论 -
(POJ - 2955)Brackets
(POJ - 2955)BracketsWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s] are reg原创 2017-08-22 09:06:02 · 234 阅读 · 0 评论 -
(LightOJ - 1422)Halloween Costumes
(LightOJ - 1422)Halloween CostumesGappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it’s Halloween, these par原创 2017-08-22 15:19:16 · 397 阅读 · 0 评论 -
(POJ - 1651)Multiplication Puzzle
(POJ - 1651)Multiplication PuzzleThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of原创 2017-08-22 17:33:19 · 386 阅读 · 0 评论 -
(HDU - 4283)You Are the One
(HDU - 4283)You Are the One The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall, so原创 2017-08-23 08:30:27 · 317 阅读 · 0 评论 -
(HDU - 2476)String painter
(HDU - 2476)String painter There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can cha原创 2017-08-23 15:31:06 · 318 阅读 · 0 评论 -
(CodeForces - 149D)Coloring Brackets
(CodeForces - 149D)Coloring Brackets 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 corr原创 2017-09-13 21:31:06 · 325 阅读 · 0 评论 -
(CodeForces - 607B)Zuma
(CodeForces - 607B)Zuma Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game is to destroy all the gemstones in t原创 2017-09-12 16:48:23 · 256 阅读 · 0 评论