[ACNOI2022] the only thing to do

subject Topic background Write for two consecutive days LCT + ddp \texttt{LCT}+\texttt{ddp} LCT+ddp, I still feel it when I look at it today d d ...

Posted by oocuz on Fri, 25 Feb 2022 12:58:07 +0100

1, Introduction to C + +

1, Introduction to C + + 1. C + + initial 1.1 the first C + + program Write code #define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> using namespace std; int main() { cout << "HelloWorld" << endl; system("pause"); return 0; } 1.2 notes **Function: * * add some book titles and explanations to the code to facilitat ...

Posted by Xeon on Fri, 25 Feb 2022 12:07:19 +0100

Why use multithreading? How many threads are appropriate to create? What is a thread pool?

Multithreading application Multithreading 1. What is a thread? 1.1 basic concept of task scheduling1.2 basic relationship between process and thread1.3 basic relationship between multithreading and multi-core2. Why use multithreading? 2.1. Application of concurrent scenarios 2.1.1 I/O bound 2.1.1.1 application of ...

Posted by mickeyunderscore on Fri, 25 Feb 2022 08:17:29 +0100

[C + +] calling sequence of constructor and destructor

1, Global, static and local variables Global variables call the constructor at the beginning of the program and the destructor at the end of the program. Static variables call the constructor when the function is called for the first time and the destructor at the end of the program. They are called only once. The constructor is called when th ...

Posted by stew on Fri, 25 Feb 2022 05:39:07 +0100

Common design patterns

1. Memory model: you can have a look Inheritance and polymorphism Memory model 2. Pattern design principles: #1: Dependency Inversion Principle High level modules should not rely on low-level modules, but both should rely on abstraction;Abstract should not rely on concrete implementation, but concrete implementation should rely on abstractio ...

Posted by shibobo12 on Thu, 24 Feb 2022 17:51:14 +0100

C + + Learning comb

C + + Learning comb :: scope operator Usually, if there are two variables with the same name, one is a global variable and the other is a local variable, then the local variable has higher priority within its scope (the proximity principle, commonly known as the strong dragon does not suppress the local snake, I decide my territory), which wi ...

Posted by edwardsbc on Thu, 24 Feb 2022 15:22:02 +0100

2-SAT problem set -ybtoj

The so-called 2-SAT problem is that there are two SAT problems (errors) SAT is the abbreviation of well posedness problem. The general form is k - well posedness problem, which is abbreviated as k-SAT. And when k > 2 ...

Posted by riwan on Thu, 24 Feb 2022 03:57:36 +0100

CSP2020-J-T3-expression

See you on the topic [CSP-J2020] expression - LuoguKnowledge point analysis: Be able to parse the specified data in the string. This topic requires to parse numbers and logical operators from the string. For ex amp le, x123 only resolves 123 and records it as the 123rd variable. For the convenience of storage, you can save &, |,! Save as a ...

Posted by Calamity-Clare on Thu, 24 Feb 2022 01:49:56 +0100

C + + smart pointer

Smart pointer Why do I need smart pointers Problems with bare pointers Bare pointer is a common pointer defined normally. It has many problems, mainly the following: 1. It is difficult to distinguish whether it points to a single object or an array; 2. After using the pointer, it is impossible to judge whether the pointer should be destroy ...

Posted by Nexy on Wed, 23 Feb 2022 16:30:13 +0100

c language self-study tutorial - file operation

1. Why use files When we learned the structure earlier, we wrote the program of address book. When the address book runs, we can add and delete data to the address book. At this time, the data is stored in memory. When the program exits, the data in the address book will naturally disappear. The next time we run the address book program, t ...

Posted by mrdave on Tue, 22 Feb 2022 14:00:55 +0100