YBTOJ software installation

Question surface: Valley portal Algorithm elements: tarjan + tree dp Topic analysis: 1, General summary It can be found that the points in a ring must be selected at the same time, so it is easy to think of tarjan shrinking points. After shrinking, a DAG is formed. Due to the condition of the subject, d[i]=0 means that one software does not ...

Added by magicmoose on Fri, 17 Sep 2021 13:54:45 +0300

Dynamic programming (Niuke network)

Simple series 1. Shares Suppose you have an array in which\ i i The first element is the stock in the second\ i i Day price. You have a chance to buy and sell. You can't sell a stock until you buy it. Please design an algorithm to calculate the maximum benefit. https://www.nowcoder.com/practice/64b4262d4e6d4f6181cd45446a5821ec?tpId=188&&a ...

Added by deane034 on Tue, 14 Sep 2021 08:20:41 +0300

Dynamic Programming Principle and LeetCode Solution

Catalog Three characteristics of dynamic planning: Dynamic Planning Solutions: 1. State Transition Table Method 2.State Transfer Equation Method 3.LeetCode Solutions 3.1 LeetCode 509.Fibonacci Number 3.2 LeetCode 70.Climb stairs 3.3 LeetCode 198.Raid homes and plunder houses 3.4 LeetCode 53.Maximum Subordinate Sum 3.5 LeetCode 152.Pro ...

Added by mentalfloss on Fri, 10 Sep 2021 08:19:02 +0300

Dynamic programming_ Count class dp_ Digital statistics dp_ State compression dp_ Tree dp_ Memory search

Count class dp Given the scheme limit, count the number of occurrences of a certain scheme Original question link https://www.acwing.com/problem/content/902/ General idea of the topic A positive integer n can be expressed as the sum of several positive integers, such as: n=n1+n2 +... + nk, where n1 ≥ n2 ≥... ≥ nk,k ≥ 1 ...

Added by tpc on Sat, 04 Sep 2021 00:06:03 +0300

123. Best time to buy and sell stocks III

123. Best time to buy and sell stocks III Given an array, its first element is the price of a given stock on day i. Design an algorithm to calculate the maximum profit you can make.You can complete up to two transactions. **Note: ** You cannot participate in multiple transactions at the same time (you must sell your previous shares before bu ...

Added by lj11 on Thu, 02 Sep 2021 22:08:29 +0300