Study notes: block
preface
Blocking can solve almost all problems such as interval query and interval update. It is more powerful than segment tree and tree array, but the time complexity will be a little greater. In fact, blocking is an optimized violence. It maintains the whole like a line segment tree and modifies the local violence.
principle
As the name s ...
Added by Pnop on Thu, 04 Nov 2021 03:21:26 +0200
C + +: Inheritance and polymorphism
1, Inheritance access test
Design member functions or variables of class A with different attributes such as public, protected and private; Class B inherits A through public, protected, private and other ways, and tests the member function or variable accessing A in the member function of class B; Add member functions or variables with dif ...
Added by mclordgt on Tue, 02 Nov 2021 20:06:27 +0200
C + + improve the stack, queue and list containers in Chapter 5
stack container
concept
Stack (stack) is a first in and last out data structureOnly the top elements in the stack can be used by the outside world, so the stack is not allowed to traverse
Common interface
1. Constructor
stack<T> st; // Stack is implemented by template class, with default constructorstack<T> st1(const stack ...
Added by potato on Tue, 02 Nov 2021 19:16:15 +0200
Parameter passing of C + + and Java in JNI (JNI parameter passing)
There are many basic methods and processes of how to use JNI on the Internet. If you don't know much about JNI, what JNI does, and how to establish a basic JNI program, you may refer to the following articles:The simplest example of using VC++6.0 to realize JNI HelloWorld of JNI introductory tutorialSUN JNI Tutorial
In the examples of these ma ...
Added by timtom3 on Tue, 02 Nov 2021 13:54:02 +0200
c + + starts from scratch -- statements and functions
1. c + + statement
This section refers to the procedure section:
#include <iostream>
int main()
{
using namespace std; // Using namespace std,
int a, b; // The declaration statement declares two variables A and B, gives them storage space named a and B, and indicates that they can store integer (int) data.
a = 5; ...
Added by jamiel on Tue, 02 Nov 2021 13:21:32 +0200
2018-2019 ACM-ICPC, Asia Shenyang Regional Contest
Training summary
This week, I chose this set of topics to practice. I feel that this set of topics still has some merits, but what we do can only be said to be in line with the rules. In addition, the speed and accuracy of simple topics have been greatly improved compared with the previous ones. Don't say more. Keep up your efforts.
C Ins ...
Added by MorganM on Mon, 01 Nov 2021 17:32:23 +0200
Leecode elementary learning data structure -- array and string
1, Arrays and strings
1. Find the central index of the array
Please calculate the central subscript of the array
The central subscript of the array is a subscript of the array. The sum of all elements on the left is equal to the sum of all elements on the right.
If the central subscript is at the leftmost end of the array, the sum o ...
Added by daarius on Sun, 31 Oct 2021 04:52:12 +0200
Simple application of recursion and recursion of basic algorithms
Common enumeration forms
Enumeration formGeneral traversal methodpolynomialRecurrenceindexRecursion, bit operationarrayRecursion, c++ next_permutationcombinationRecursion + pruning
Implement exponential enumeration
DFS (I)
The idea is to output in the form of increasing along the path.
#include <iostream>
#include <stdio.h>
...
Added by mark123 on Sat, 30 Oct 2021 22:05:24 +0300
dfs, bfs (several examples)
preface
Tip: the following is the main content of this article. The following cases can be used for reference
I P1683 getting started
Title Description Not everyone can enter Taohua island. Pharmacist Huang hates people as stupid as Guo Jing. Therefore, he built a path at the only entrance to Taohua Island, which was all paved with ...
Added by jlryan on Sat, 30 Oct 2021 07:06:13 +0300
Virtual function, virtual inheritance, polymorphism and virtual function table of c + + Notes
reference resources: C + + - virtual function, virtual inheritance, polymorphism and virtual function table - Zhihu (zhihu.com)
1. What is a virtual function?
Virtual function is a kind of internal function modified by virtual keyword, which can be divided into virtual function and pure virtual function. Let's take a look at the code first: ...
Added by Envex on Fri, 29 Oct 2021 12:58:53 +0300