2022LDU winter vacation training - patch
Patch
Problem description
There are always errors in a program. The company often releases patches to correct these errors. Unfortunately, when correcting some errors with each patch, some errors will be added at the same time. Each patch has a certain running time. A company published a game with n errors B={b1,b2,b3,..., bn}, so the comp ...
Added by MishaPappa on Sat, 08 Jan 2022 12:25:07 +0200
[PAT (Basic Level) Practice] - [find element] 1028
I. [Topic difficulty]
Class B
II. [Title No.]
1028 census (20 points)
III. [Title Description]
A census was conducted in a town and the birthdays of all residents were obtained. Now please write a program to find out the oldest and youngest people in the town.Here, ensure that each entered date is legal, but not necessarily reasonable ...
Added by phprocker on Sat, 08 Jan 2022 11:17:34 +0200
Solution to the problem of Luogu P1656 bombing Railway
The first title of konjaku
Original question link
Er, first simplify the meaning of the question. The general meaning is to let you blow up one of the m railways, so that two of the n cities are not connected (the idea of using and searching the set is to let you cut off one edge, so that there are two connected blocks).
If you don't look at ...
Added by thepeccavi on Wed, 05 Jan 2022 05:18:59 +0200
Algorithm foundation Chapter 3 search and graph theory
Graph algorithm (array version)
1.1 shortest path Dijkstra algorithm:
Suppose the vertices are \ (V_0 to V_5 \) six points. There is no connection at the beginning, but the edge weights between the vertices that can reach each other are known.
The step is to start searching from vertex 0 each time, find the point with the shortest distance fro ...
Added by jeopardy_68 on Thu, 30 Dec 2021 20:21:23 +0200
Chapter 8 - shortest path
Shortest path problem
For the algorithm operation of related concepts, see This article. Only the codes of Dijkstra algorithm and Floyd algorithm are introduced here.
Dijkstra algorithm
BFS can find the shortest path length from a point to another point. Dijkstra algorithm is mainly to find the shortest path length from a point to all oth ...
Added by mad_hacker on Thu, 30 Dec 2021 03:28:55 +0200
Shortest path algorithm -- dijkstra
dijkstra
Premise: in a graph, there can be no edges with negative weight.
Give you a starting point. What is the shortest distance from the starting point to all nodes? If a point cannot be reached, the distance to this point is positive infinity (usually in a directed graph).
For example, see the following figure: the set on the right repre ...
Added by kristalys on Mon, 27 Dec 2021 15:05:39 +0200
Educational Codeforces Round 85 (Rated for Div. 2) A~E problem solution
A. Level Statistics
meaning of the title Give you a sequence of game moments, each of which contains
p
i
,
c
i
...
Added by mcclellanfsu on Sun, 26 Dec 2021 14:01:34 +0200
Introduction to graph theory (Autobiography)
Introduction to graph theory
Establishment and storage of Graphs
Adjacency table
vector implements adjacency table
Adjacency table is an edge oriented data structure, so the content of the edge needs to be stored in a structure **
About vector
1,establish vector object vector<int> vec;
2,insert vec.insert();
3,delete vec.erase();
4, ...
Added by spicerje on Sat, 25 Dec 2021 02:08:40 +0200
[data structure] independent path calculation
Problem description
Lao Zhang and Lao Wang love to climb mountains. They must climb Xiangshan once a week. Once, the two people had a dispute about how many paths there were from the east gate to Xianglu peak, so they agreed that who walked the route that the other party didn't walk in a period of time would win. Given a circuit diagram (undir ...
Added by nttaylor on Fri, 24 Dec 2021 20:40:25 +0200
2021-12-23 [data structure course design] [key path]
Critical path:
Planning, construction process, production process and procedure process are usually regarded as a project. The project is usually divided into several sub projects called "activities". After these "activities" are completed, the project can be completed. AOE net is usually used to represent engineering. AOE ...
Added by bigger on Thu, 23 Dec 2021 14:18:01 +0200