Algorithmic competition Getting started classic Dynamic programming

Source: Internet
Author: User

111-history Grading LCS

103-stacking Boxes The maximum number of box dags to stack

10405-longest Common subsequence LCS

674-coin Change Total knapsack solution number

10003-cutting sticks interval DP Dp[l][r] represents the minimum cost for cutting L to R

116-unidirectional TSP Simple recursive output dictionary order minimum solution to push forward from behind

10131-is bigger Smarter? The longest way of a DAG

10066-the Twin Towers LCS

10192-vacation LCS

147-dollars Total Knapsack Solution number

357-let Me count the Ways full backpack solution number

562-dividing coins All items divided by 2 for backpack volume do 01 backpack

348-optimal array multiplication Sequence matrix chain multiplication + output solution

624-CD 01 Backpack + Output Solution

10130-supersale 01 Backpack

531-compromise LCA

10465-homer Simpson Full Backpack

10285-longest Run on a Snowboard ski classic memory Search

437-the Tower of Babylon longest ascending sequence LIS

10404-bachet ' s Game full backpack

。 620-cellular Structure

825-walking on the Safe Side straight left up to bottom right

10069-distinct subsequences Large number +DP

DP[I][J] The number of the second string 0-j-1 substring for the first character length I appears

DP[I][J] = Dp[i-1][j] if (S[i]==s[j]) dp[i][j] + = dp[i-1][j-1]

10534-wavio Sequence LIS

Positive and negative two-time dichotomy +lis

10051-tower of Cubes Memory Search bar

It's like building blocks.

10651-pebble Solitaire Search

590-always on the Run

DP[I][J] for the first day to reach the minimum value of J City

10306-e-coins Full Backpack

DP[I][J] for the minimum number of the horizontal axis for the I ordinate for Y and finally for the smallest i*i+j*j=s*s dp[i][j]

10739-string to palindrome at least a few times to become palindrome string

10304-optimal Binary Search Tree interval dp

A minimum of two forks. The weight of a binary tree is the weighted value of all points * depth is summed

DP[I][J] = Dp[i][k-1]+dp[k+1][j] + a[i]+a[i+1]+...+a[j]-a[k]

10271-chopsticks Dp[i][j] The minimum value of J pair to be selected before I root chopsticks

10617-again palindrome to find the number of palindrome string

if (A[i]==a[j]) dp[i][j] = Dp[i][j-1]+dp[i+1][j] otherwise dp[i][j] = dp[i][j-1]+dp[i+1][j]-dp[i+1][j-1];

11137-ingenuous cubrency Full Backpack

10201-adventures in Moving-part IV

。 10154-weights and Measures

10453-make palindrome Minimum number of modifications margin palindrome + output palindrome

。 10029-edit Step Ladders

10313-pay The price backpack variant

DP[I][J] The scheme number of I denominations with a J-coin dp[i][j] + = Dp[i-w][j-1] W is a certain denomination of the current enumeration of coins

10401-injured Queen problem Dp[i][j] Represents (i, j) the number of scenarios where the Queen is placed

10891-game of Sum game DP interval DP

11151-longest palindrome

10911-forming Quiz Teams State compression DP

10635-prince and Princess LCS to Lis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.