Dynamic programming (DP) algorithm problem 1

Problem description and status definition Digital triangle problem. There is a triangle composed of non negative integers. There is only one number in the first row. Except for the lowest row, there are one number at the lower left and right of each number, as shown in the figure. Starting from the number in the first line, you can go dow ...

Posted by ReDucTor on Sun, 10 Oct 2021 09:34:08 +0200

Algorithm [Luogu P2078] friend

Topic background Xiao Ming works in company A and Xiao Hong works in company B. Title Description The employees of the two companies have one characteristic: the employees of one company are of the same sex. Company a has N employees, including P pairs of friends. Company B has M employees, including Q pairs of friends. A friend's friend mu ...

Posted by F.Danials on Sun, 10 Oct 2021 06:56:06 +0200

Fundamentals of cuda Programming

Chapter I Purpose: accelerate 3D imaging, computational fluid dynamics, molecular simulation, etc. most of these application scenarios require a lot of scientific computing. The powerful parallel computing ability of GPU enables it to complete these super large number of computing tasks, shorten the computing time and reduce the computing ...

Posted by spicey on Sat, 09 Oct 2021 14:12:17 +0200

[C/C + + foundation] (type conversion Series III) dynamic_cast and std::dynamic_pointer_castcast

if static_cast is the inheritance of C + + to C-style type conversion, so dynaic_cast can be said to be completely divorced from C-style type conversion and mainly serves the polymorphism of C + +. Learning to use this type conversion correctly is very important in the practice of large-scale software development. In large-scale software, ...

Posted by svenski on Sat, 09 Oct 2021 13:15:00 +0200

Learning records of source code analysis

2021SC@SDUSC Since this week, our team has officially launched the analysis of Dust3D source code. After group discussion, we roughly divided the files into three modules: model construction, bone and animation, rendering and material according to the file name of the open source project. Among them, we speculate that the file beginning with m ...

Posted by enkidu72 on Sat, 09 Oct 2021 01:42:57 +0200

Learning notes 3 of STL Standard Template Library (STL hash container)

The underlying implementation of associative container (sorting) adopts tree storage structure, more specifically red black tree structure;The underlying implementation of unordered container (hash) adopts the storage structure of hash table. Different methods are adopted based on the underlying implementation data structure Therefore, compar ...

Posted by nelsons on Fri, 08 Oct 2021 09:04:42 +0200

Reference -- C + + basic knowledge points

extern "c" quote Instead of defining a new variable, a reference gives an alias to an existing variable. The compiler will not open up memory space for the referenced variable. It shares the same memory space with the variable it references. #include <iostream> using namespace std; // C + + standard library int main() { int a = 1 ...

Posted by Risingstar on Fri, 08 Oct 2021 04:02:23 +0200

[template question] breadth first search (BFS)

1, Maze problem [Title Description] Given an n × A two-dimensional integer array of m is used to represent a maze. The array contains only 0 or 1, where 0 represents the road that can be taken and 1 represents the wall that cannot be passed. Initially, a person is located at the upper left corner (1,1), and it is known that the person ca ...

Posted by designerguy on Fri, 08 Oct 2021 03:41:11 +0200

C and pointer learning notes -- string common library functions

This series is mainly some notes on my study of C and pointer. It is mainly about some small details for my own study and reference. In detail, it is suggested that you can read some of C and pointer String length The prototype of the library function strlen is as follows: size_t strlen( char const *string ); Note that strlen retur ...

Posted by maga2307 on Thu, 07 Oct 2021 22:47:46 +0200

Summary of common C++STL

Summary of common C++STL 1, vector, variable length array, multiplication idea size() returns the number of elements empty() returns whether it is empty front()/back() returns the head or tail of the array push_back() insert element at tail pop_ Delete element at the end of back() Iterator: begin()/end() Support random addressing: [] Support ...

Posted by MrAdam on Thu, 07 Oct 2021 20:56:45 +0200