C + +: use of vector

vector definition Vector: a data structure in C + +, specifically a class It is equivalent to a dynamic array. When programmers cannot know the size of the array they need, using it to solve the problem can achieve the purpose of maximum space saving Usage: 1. The document includes: First, add #include at the beginning of the program to ...

Added by mona02 on Sun, 23 Jan 2022 14:02:47 +0200

Data structure Li Chao line segment tree

title: "data structure" Li Chao line segment tree date: 2022-01-22 10:38:01 tags: c++ data structure categories: data structure mathjax: true description: a brief explanation of Li Chao's line segment tree #0.0 chip in front Li Chao's line segment tree is built by Li Chao, the team master of Xuejun middle school Provincial lectures ...

Added by premracer on Sun, 23 Jan 2022 11:23:50 +0200

Great God forum reverse shelling analysis basic learning notes three general registers and memory reading and writing

This article is the third of my study notes on reverse cracking shelling in the great God forum. It is my review and summary of what I have learned in the past. There may be fallacies. You are welcome to point out. Notes will be released one after another, hoping to help Mengxin who wants to get started and make progress together 32-bit gener ...

Added by monkeytooth on Sun, 23 Jan 2022 09:03:17 +0200

Writing a simple thread pool

Thread pool Define a simple thread pool. The main structure includes two, one is task and the other is thread pool. The maintainer thread queue and task array in the task pool. The sub threads in the thread queue will cycle to extract tasks from the task array. The addition of tasks and the consumption of threads are a pair of producers and co ...

Added by cl77 on Sun, 23 Jan 2022 03:29:00 +0200

Detailed explanation of map usage in STL in C + +

map usage details Map is an associated container of STL. It provides one-to-one data processing capability. Due to this feature, it may provide a fast channel in programming when we process one-to-one data. Let's talk about the organization of data in the map. A red black tree (a balanced binary tree in a non strict sense) is built in the map. ...

Added by Ruiser on Sat, 22 Jan 2022 21:00:20 +0200

1040: output absolute value

1040: output absolute value time limit: 1000 ms Memory limit: 65536 KB [Title Description] Enter a floating-point number and output the absolute value of the floating-point number to two decimal places. [input] Enter a floating point number whose absolute value does not exceed 10000. [output] Output the absolute value of this floati ...

Added by regiemon on Sat, 22 Jan 2022 11:45:06 +0200

C + + classes and objects (six default member functions in the class)

Default member function of class If a class has no members, we call it an empty class. But there is not nothing in the empty class. The compiler will automatically generate six default member functions. If we implement the default member function, the compiler will not generate by default. The purpose of the default member function is to p ...

Added by CrazeD on Sat, 22 Jan 2022 11:25:38 +0200

OpenGL super classic notes - depth texture and shadow

Previously, we introduced the simple method of flattening objects to the projection plane to create shadows. However, this shadow method has its limitations (for example, the projection plane must be a plane). In opengl1 4 introduces a new method shadow map to generate shadows. The principle behind shadow mapping is simple. We first take the p ...

Added by bestrong on Sat, 22 Jan 2022 07:31:58 +0200

NOIP2012] cultural tour - (search question)

Link: https://ac.nowcoder.com/acm/problem/16577 Source: niuke.com Title Description There is a messenger who wants to travel around countries. Every time he goes to a country, he can learn a culture, but he is unwilling to learn any culture more than once (that is, if he learns a culture, he can't reach other countries with this culture). Diff ...

Added by jimdy on Sat, 22 Jan 2022 06:57:38 +0200

11C + + exception handling

exception handling 1. Introduction Like java, the program often encounters some errors when running. If it is not handled, it is likely to cause the program to crash. The C + + exception handling mechanism allows us to catch and handle these errors The C + + exception handling mechanism involves three keywords: try, catch and throw. 2. Comm ...

Added by clank on Sat, 22 Jan 2022 05:27:47 +0200