Qing North School dp graph theory Camp Travel day1

Lecturers:

Dp's understanding of the teacher is similar to the partition idea, launched by the small state great state. The difference is that there is no overlapping sub-divide and conquer algorithm problem.

dp handle the problem the more the smaller the plan, which introduced the basic state. Then dp equation, to meet the simplicity and full description of conditions can affect the final outcome.

Transfer? zhx: childhood issues to the big question is transferred.

Original title link: .

Ideas: first linked to the number of rows of a sequence

This question and missile interceptors almost, you were descending order of l, then the title text becomes a rising number of not seeking the longest sequence, that is, the length of the longest sequence of sub-rise.

n ^ 2 approach.

N ^ 4 first want to practice, and then step by step optimization.

Road to the water problem.

The end of the morning.

in the afternoon:

Sequence dp, dp range

 

 

For a sequence of brackets, left and right parentheses as a group to carry out the operation for elimination brackets inside each sequence, and finally always get something like this: so we can right this problem into another problem:

For this question, we have to in order to prevent blood less than zero, by the dozen monster reduce the amount of blood in ascending order.

 

Return to this topic:

 

 

 Such questions as: Cattleya number:

Amway classic questions:

code show as below:

Interval dp:

Transfer equation: dp [i] [j] = min (dp [i] [k] + dp [k] [j] + gcd (a [i], a [j])); very ez.

end. zhx very strong

Guess you like

Origin www.cnblogs.com/lbssxz/p/11311115.html