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

C++ virtual virtual function

1, Definition Simply put, those member functions modified by the virtual keyword are virtual functions. The function of virtual function, explained in professional terms, is to realize Polymorphism, which is to separate the interface from the implementation; Using vivid language to explain is to achieve common methods, but adopt different strat ...

Posted by jorgep on Fri, 20 May 2022 09:51:12 +0300

C + +: develop a game logic engine

Developing a game may seem very difficult, but with the help of C + +, it will become easier. If you are an old hand in developing games, you should know the Unity engine. This engine not only provides logic support, but also provides UI support. It's all dirty. However, we also want to develop a game engine. Can be achieved. But Today, our pro ...

Posted by greepit on Thu, 19 May 2022 17:37:07 +0300

C++ binary search tree encoding and decoding

Serialize and deserialize binary search trees Title [leetcode449] Serialization is the process of converting a data structure or object into a series of bits so that it can be stored in a file or memory buffer, or transmitted over a network connection link for later reconstruction in the same or another computer environment. Design an algorithm ...

Posted by idire on Wed, 18 May 2022 13:53:33 +0300

Solutions to group B of C + + University in the 10th Blue Bridge Cup programming competition in 2019

catalogue A. Square sequence B. Prime number splitting D. Evaluation E. Path count F. Optimal inclusion G. Permutation number H. Puzzle game 1. The eighth miracle A. Square sequence Topic analysis: Y < y, y < y, y < y -  ==  - (judgment condition of arithmetic sequence) then record x+y = minimum value, and finally out ...

Posted by kra on Wed, 18 May 2022 01:38:29 +0300

Data Structure Chapter 6 Graph Study Notes

content 1. Figure 6.1 Definition of graph 6.2 Basic terminology of graphs 6.3 Graph storage structure 6.3.1 Lead matrix 6.3.2 Adjacency List 6.4 Traversal of graphs 6.4.1 Depth-First Search (DFS) 6.4.2 Breadth-First Search (BFS) 6.5 Applications of graphs 6.5.1 Minimum Spanning Tree 6.5.2 Shortest path 6.5.3 Topolog ...

Posted by Ramtree on Wed, 18 May 2022 01:04:31 +0300

HDU - 1257 minimum interception system (dp three methods)

Title Link: [minimum interception system] General meaning: One shell of the interception system can reach any height to intercept enemy missiles, but this shell can not exceed the previous height in the future, that is, it can not intercept missiles higher than him again. Then give some missiles and ask how many interception systems are ne ...

Posted by mrheff on Tue, 17 May 2022 12:49:43 +0300

Operating system process scheduling experiment report

1. Implement four different and process scheduling algorithms: First come first service, time slice rotation, priority scheduling and short job priority scheduling algorithms. 2. Understand the concepts of process control block and process queue through experiments. 1. Run the code in the material and observe whether the execution result i ...

Posted by Sk8Er_GuY on Tue, 17 May 2022 03:39:12 +0300

Classic problems of sliding window algorithm and general code summary

The questions are as follows: Give you a string s and a string t. Returns the smallest substring in s that covers t all characters. If there is no substring covering t all characters in s, the empty string "" is returned. be careful: For repeated characters in T, the number of characters in the substring we are looking for must not ...

Posted by subalan on Tue, 17 May 2022 02:00:21 +0300

Simple point - c-Lesson5 (structure, branch statement (if, switch), difference between p and * p)

1. Structure (1) A structure definition is a collection that describes different data types or the same data type. (complex type) (2) Access structure: pointer access structure (- >); Variable name access structure (.) (3) The difference between p and * p depends on whether it is a left value or a right value. #if 1 #include < ...

Posted by heminfotech on Mon, 16 May 2022 23:33:28 +0300