P1003 [NOIP2011 improvement group] carpet laying

P1003 [NOIP2011 improvement group] carpet laying Title Description In order to prepare for a unique award ceremony, the organizers laid some rectangular carpets on a rectangular area of the venue (which can be regarded as the first quadrant of the plane rectangular coordinate system). There are nn carpets, numbered from 11 to nn. Now lay thes ...

Posted by lobster on Mon, 08 Nov 2021 00:47:25 -0800

ICPC Macao 20I - tree chain subdivision optimization, space complexity, good problem

Portal 1 perhaps Portal 2 Note that the space limit is 8MB! This question is too comprehensive. If you can write it independently, it means that you can get gold at Macao station. In addition, the space complexity of tree chain subdivision optimization is really the first time I heard~ Firstly, it examines a conclusion of game theory: in the ...

Posted by YorkshireSteve on Sun, 07 Nov 2021 17:15:02 -0800

Learning summary of the new semester 5

This week, I continued to do questions and found many problems and deficiencies that need to be improved. P1064 [NOIP2006 improvement group] Jin Ming's budget plan This is a knapsack problem, but some changes have been added on the basis of the original complete knapsack: each item has at most 2 accessories. Only by adding this item can its acc ...

Posted by sumitnice@rediffmail.com on Sun, 07 Nov 2021 14:56:50 -0800

188. The best time to buy and sell stocks IV

catalogue188. The best time to buy and sell stocks IVsubjectProblem solution 188. The best time to buy and sell stocks IV subject Given an array of integers   prices, its i-th element   prices[i] 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 k transacti ...

Posted by valtido on Sat, 30 Oct 2021 21:47:05 -0700

[naval International Program Office] Doorman

Doorman Topic overview Problem solution Sister's favorite tree set tree optimization dp. First, it should be easy to come up with a d p dp The idea of dp. As Niuniu has only two movements in the whole process, stay at the door, run ...

Posted by ShopMAster on Wed, 27 Oct 2021 20:15:42 -0700

[ybtoj efficient advanced 21169] destruction plan (classified discussion) (tree DP)

Destruction plan Title Link: ybtoj high efficiency advanced 21169 General idea of the topic Give you a tree, and then you need to find two paths without intersecting edges, so that after deleting the points of the two paths and their adjacent edges, the tree is divided into as many connected blocks as possible. thinking This is the classif ...

Posted by brettpower on Sun, 24 Oct 2021 18:29:46 -0700

October 23, 2021 (weekly summary)

        This week, I mainly brush some dp questions. Finally, if I want to brush according to the topic, I'll start with the backpack. Today, I don't see the question for the first time. I solved a backpack question in the provincial competition last year. I'm still very excited. At least I didn't learn in vain. It's still ...

Posted by tjmbc on Sat, 23 Oct 2021 04:57:28 -0700

Dynamic programming linear dp

1. Introduction 1.1 what is dynamic programming? Dynamic Programming is a mathematical method of optimization in the solution process (also known as global optimization). The multi-step process is transformed into a series of single-step problems, which are solved one by one by using the relationship between each step. (dynamic programmi ...

Posted by JADASDesigner on Tue, 19 Oct 2021 22:17:48 -0700

leetcode 638. Shopping Offers | 638. Big gift bag (dynamic programming, multi constraint knapsack problem)

subject https://leetcode.com/problems/shopping-offers/ Problem solution Similar topics include: leetcode 474. Ones and Zeroes | 474. One and zero (double constrained knapsack problem) This problem is essentially a knapsack problem with multiple constraints (n < 6). The goal is to minimize the total price when the knapsack is just full. ...

Posted by trink on Tue, 12 Oct 2021 15:33:31 -0700

Talking about TSP of repeatable cities (shortest distance + specific walking method)

Hello, guys. Today, I'd like to briefly talk about the TSP problem of this repeatable city. The so-called repeatable means that the city and route can be taken casually, as long as the sum of its paths is the smallest in the end. The knowledge points to be used are state compression dp and Floyd algorithm 1, Floyd algorithm Floyd algorithm: ...

Posted by Remote4ever on Sun, 10 Oct 2021 10:41:23 -0700