Summer training match 1
A. metal collection
Searched. It's found that it's a tree dp. This thing really doesn't, and it hasn't been done... So I can't understand it for the time being..
B solution of univariate cubic equation
Solution idea: use floating-point numbers to enumerate from negative numbers to positive numbers. According to the position of t ...
Posted by wsh on Sun, 16 Jan 2022 23:00:40 +0100
PAT [L2-016] may all lovers in the world be brothers and sisters who have been separated for many years (dfs super detailed explanation)
Original title
ha-ha. As we all know, intermarriage is not allowed within five clothes, that is, if the nearest common ancestor of two people is within five generations (i.e. myself, parents, grandparents, great grandparents and high grandparents), they cannot intermarry. Please help a couple to judge whether they can get married or not?
Inpu ...
Posted by rinteractive on Sat, 15 Jan 2022 05:17:13 +0100
Breadth first search (BFS) and depth first search (DFS)
1, Depth first search (BFS)
1. Introduction
BFS, its full English name is bread first search. BFS does not use rule of thumb algorithms. From the point of view of the algorithm, all child nodes obtained by expanding nodes will be added to a first in first out queue. In general experiments, the nodes whose neighbor nodes hav ...
Posted by wing_zero on Wed, 05 Jan 2022 16:46:51 +0100
Sword finger offer: motion range of JZ66 robot
describe
There is a grid of rows and cols columns on the ground. The coordinates are from [0,0] to [rows-1,cols-1]. A robot starts to move from the grid with coordinates 0,0. Each time, it can only move one grid in the left, right, upper and lower directions, but it cannot enter the grid where the sum of digits of row coordinates and column co ...
Posted by rweston002 on Sun, 26 Dec 2021 12:47:12 +0100
Topic summary of recursive backtracking (issue 4)
Directions for the first three phases:
Phase I
Phase II
Phase III
This should be the last issue of backtracking. The previous topics are more conventional, basically what subset or arrangement of written language. This issue summarizes some topics that prefer application. Of course, the essence is still that set.
Examples
Letter combinati ...
Posted by nmal on Sat, 18 Dec 2021 10:38:07 +0100
DFS oilfield problems
Graffiti intelligent autumn stroke test questions, many algorithm questions have been learned in college, but at that time, they didn't fully contact the front end. In addition, they didn't review and return them to the teacher. They really hate food when books are used!
Problem description
Description
An oil exploration company is ...
Posted by shimano55 on Fri, 22 Oct 2021 06:45:16 +0200