Blue Bridge Cup ALGO-1006 gold coin dynamic programming double solution

subject analysis This is a typical example of dynamic programming. The optimal substructure should be selected at each step, that is, the lattice that can get the most gold coins. Here are two ideas to solve this problem: backtracking and dp array. These two ideas can be said to find the optimal solution in the opposite way, one from top t ...

Added by joeami on Sun, 20 Feb 2022 06:29:30 +0200

day03_ Constant, literal, variable, data type

Literal Literal quantity is data / value, for example: 1234, true, "abc", in ‟, 3.14. In real life, you will be exposed to data every day. For example, your weight today is 86Kg. You spent , 500 yuan and bought a watermelon. The weight is , 8.6Kg. It's sunny outside, but you say it's stormy and rainstorm. What you say is false. Yo ...

Added by mbbout on Sun, 20 Feb 2022 06:26:54 +0200

[LINUX] multithreading (producer consumer model, POXIS semaphore)

Producer consumer model Why use the producer consumer model Producer consumer model is to solve the strong coupling problem between producers and consumers through a container. Producers and consumers do not communicate directly with each other, but communicate through the blocking queue. Therefore, after producing data, producers do n ...

Added by maexus on Sun, 20 Feb 2022 06:24:52 +0200

Automatic pet feeder using Arduino

Original text: https://circuitdigest.com/microcontroller-projects/automatic-pet-feeder-using-arduino Automatic pet feeder using Arduino ARDUINO Pass by** Pankaj Khatri **April 3, 2018 56 Today, we are building an automatic pet feeder based on Arduino, which can automatically provide food for your pet in time. It has a DS3231 RTC (real-time ...

Added by runnee on Sun, 20 Feb 2022 06:07:57 +0200

Different templates exist at the same time (Jsp, FreeMarker, Thymeleaf)

Template priority FreeMarker view parser priority: Thymeleaf view parser priority: Jsp has the lowest priority Test code Create.01 html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>01.html--thymeleaf</h1> </ ...

Added by Diego17 on Sun, 20 Feb 2022 05:52:07 +0200

C + + syntax notes

Notes (C + +) This article has some knowledge of C + + syntax and object-oriented, involving the bottom of assembly. 1. Essential differences between programming languages Compiled language (independent of virtual machine)scripting language Compiled language (virtual machine dependent)C,C++,object-CPHP,Python,JavaScriptJava,Ruby C + + cod ...

Added by champoi on Sun, 20 Feb 2022 05:51:31 +0200

[vue2 component encapsulation learning] vue2 component encapsulation learning Dialog box Dialog box

Write in front Due to the use of learning records, there are imperfections. We will improve and release the source code after all learning (should). Thank you for reading step Create base template establish. vue file, named APL dialog vue, use the shortcut key to put on the three piece set of components (template,script,style) In order to a ...

Added by laserlight on Sun, 20 Feb 2022 05:33:59 +0200

Spring boot simplifies the basic usage of Mybatis and Mabatis

There are four return value types: 1.1 project integration 1.1.1 create project   1.1.2 import jar package Description: in POM Add jar package file to XML file <!--mybatis Dependent package--> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis ...

Added by benkillin on Sun, 20 Feb 2022 05:32:36 +0200

share_ptr memory leak

Here is shared_ There are three common ways to define PTR: shared_ptr sp;// Declare a smart pointer to type int sp.reset(new int(42)); auto sp1 = make_shared<string>("hello");//sp1 is a smart pointer shared_ptr sp2(new int(42)); And make_ The shared method is a recommended one. It uses one-time allocation and is relatively safe. We all ...

Added by aquila125 on Sun, 20 Feb 2022 05:31:38 +0200

Redis installation and common commands

preface Although relational database is widely used, its performance is relatively poor in the face of current data access. At this time, his good friend non relational database appeared. Enterprise development generally combines the two. Next, we will introduce the non relational database Redis (it is said that Redis was originally deve ...

Added by dantone on Sun, 20 Feb 2022 05:27:48 +0200