## 2022 Hangzhou Electric Power Multi-School 9 (Summary + Supplement)

summary Today, this multi-school should be the best one to hit this summer vacation (although the ranking is not very high). My starting teammate found that the tree dp was signed in for question 1009. I thought about guessing an even-numbered side. I stared at my teammate and wrote A for ten minutes. Then we went to see 1003 again. After my t ...

Posted by thomasgrant on Thu, 18 Aug 2022 22:30:52 +0300

## [algorithm] the course schedule is not simple -- topological sorting

introduction   >_< Now we need to arrange a timetable for the students (the learning order of the course) But it's not that simple:   curriculum Precursor course Course 0 Course 1 Course 0, course 4 Course 2 Course 3 Course 0 Course 4 Course 5 Course 3 Course 6 Course 3   Might as well draw a Graph and try i ...

Posted by noimad1 on Wed, 25 May 2022 22:41:14 +0300

## [for beginners] PTA 06 - Figure 3 six dimensional space (30 points) DFS passes test point 4

Non subject class Xiaobai, record the learning process The first reaction to this question is dfs, which is easy to record the number of layers, but dfs has defects. See details for details "Why not use DFS" https://blog.csdn.net/sharemon/article/details/102857989 . Such as data (1) 8 8 1 3 1 2 2 3 3 4 4 5 5 6 6 7 7 8 ...

Posted by aaronlzw_21 on Tue, 24 May 2022 01:28:07 +0300

## ACwing 257 - detaining criminals (dichotomous answer + dichotomous coloring)

There are two prisons in S City, holding a total of N criminals, numbered 1~N respectively. Naturally, the relationship between them is also extremely disharmonious. Many criminals have even accumulated grievances for a long time. If the objective conditions are met, conflicts may break out at any time. We use "resentment value" (a po ...

Posted by hame22 on Fri, 20 May 2022 15:31:44 +0300

## Blue Bridge Cup 2015 preliminaries tree of life DFS diagram

Everyone thinks that writing is OK. You can praise, collect and pay attention to it! You can also come to mine Personal blog Visit, it is estimated that it will be updated in recent years! Make friends with me! https://motongxue.cn Blue Bridge Cup 2015 preliminaries tree of life 😁 Title Description In the X forest, God created the tre ...

Posted by 2705ap on Thu, 12 May 2022 01:45:03 +0300

## [Leetcode]928. Minimize Malware Spread II

Title address: https://leetcode.com/problems/minimize-malware-spread-ii/ Given a n n An undirected graph with n nodes is given by adjacency matrix. Each node represents a node in a network. Give another array A ...

Posted by msarefin on Tue, 26 Apr 2022 09:58:44 +0300

## [backtracking algorithm] 0-1 knapsack problem

[problem description] Given an item set s = {1, 2, 3,..., n}, the weight of item i is wi, its value is vi, and the capacity of the backpack is w, that is, the maximum carrying capacity does not exceed W. Within the limited total weight W, how can we choose items to maximize the total value of items. input The first data is that the capa ...

Posted by wolfraider on Tue, 12 Apr 2022 21:06:02 +0300

## leetcode depth first search, breadth first search and joint search

1, Popular explanation: source Depth first can think like this. A person gets lost and meets many forks. He has only one person and wants to go out, so he can only try one by one. When one road goes to the dark, he finds the end, and then turn back to the other forks of the road just now. Finally, he finds that all the forks of the road have be ...

Posted by jax_15 on Wed, 30 Mar 2022 21:36:20 +0300