On tree chain subdivision
Tree chain subdivision
Template question
As the name suggests, it is to express the shape of the tree with a linear linked list. Then the first thing is to build a tree.
ll siz[N],dep[N],son[N],fa[N];//Son is the coordinate of the great son whose ancestor is x
void build_tree(int now)
{
siz[now]=1;//Size of initialization tree
for(int i=h ...
Posted by sonic_2k_uk on Sat, 19 Feb 2022 22:39:54 +0100
C Programming learning notes [edited by Mr. Tan Haoqiang] (Chapter V programming of loop structure) 02 changing the state of loop execution
1, Early termination of a loop with a break statement
Function: make the process jump outside the loop body, and then execute the statements below the loop body.
Note: the break statement can only be used in loop statements and switch statements, not alone.
Charity fundraising will be held among 1000 students in the Department. It ...
Posted by gushy on Sat, 19 Feb 2022 22:39:14 +0100
Java classes and objects
object-oriented
encapsulation
One of the core ideas of object-oriented programming is to encapsulate data and operations on data. Through abstraction, common properties are extracted from concrete examples to form general concepts, such as the concept of classes.
People often talk about the motor vehicle class is a concept formed by ex ...
Posted by geebo on Sat, 19 Feb 2022 22:23:26 +0100
Strategy design pattern
Application of strategy design pattern in spring source code
Use of policy design patterns
Combined with my own learning, I have some understanding of the strategy mode. First of all, the use background, in short, is used in scenarios with multiple strategies. This seems to be nonsense. Take a simple example
Let's simulate the parsing logic ...
Posted by rcorlew on Sat, 19 Feb 2022 22:20:00 +0100
python - regular expression (remodule) explanation
If you are Xiao Bai, this data set can help you become a bull. If you have rich development experience, this data set can help you break through the bottleneck. 2022 Web Full Video Tutorial Front End Architecture H5 vue node Applet Video+Materials+Code+Interview Questions.
When you need to match strings through regular expressions in Python, ...
Posted by Guardian-Mage on Sat, 19 Feb 2022 22:10:44 +0100
React centralized route management + route authentication
1. Why use react_router_config
Using routes in React generally uses NavLink and Route in React router DOM, writes Route links using NavLink, and registers routes using Route:
import { NavLink, Route } from 'react-router-dom';
...
{/* Routing link */}
<NavLink to="/home">Home</NavLink>
<NavLink to="/about">About</NavLink& ...
Posted by lentin64 on Sat, 19 Feb 2022 22:05:59 +0100
VII. Java object oriented
Object oriented concept
Process oriented & object oriented
Process oriented thought
The steps are clear and simple. What to do in the first step and what to do in the second stepFacing the process, it is suitable to deal with some relatively simple problems Object oriented thought
Birds of a feather flock together in a classif ...
Posted by dschreck on Sat, 19 Feb 2022 22:04:30 +0100
JAVA distributed -- SpringbootSpringboot quick start, core configuration file interpretation, directory interpretation, custom configuration items, @ Value annotation @ configurationproperties
1, springboot Basics
1.1 general
Spring Boot can easily and quickly create applications based on the spring framework, which enables coding, configuration, deployment and monitoring. Spring Boot has attracted much attention in the industry because it simplifies the complexity and makes the development extremely simple and fast.
1.2 character ...
Posted by trg on Sat, 19 Feb 2022 21:55:01 +0100
Longest ascending subsequence model for dynamic programming
preface
Let's first analyze the original LIS problem with Yan dp analysis
Strange thief Kidd's glider wing
Title Transfer door
We can start at any point, and there are two directions: left and right. We have to make the most of the buildings we pass
Solution idea: let's take a look at the board problem of the longest body sequence whe ...
Posted by j007w on Sat, 19 Feb 2022 21:45:40 +0100
[daily question] day13_02 parameter analysis
Learning objectives:
Objective: to skillfully use the knowledge of Java
Learning content:
Content of this article: using java to solve parameter parsing
Title Description
Enter the following command on the command line:
xcopy /s c:\ d:\,
The parameters are as follows:
Parameter 1: command word xcopy
Parameter 2: string / s ...
Posted by grandman on Sat, 19 Feb 2022 21:42:05 +0100