2022 winter vacation training game 3

A: One two five eight Title Description There is a tribe on Planet X that has been using an ancient set of coins. This set of coins has four denominations: 1 star, 2 stars, 5 stars and 8 stars. The x-star man decided to carry the currency with a total amount of N-star for a global trip, because he needed to carry too many items. He wanted ...

Added by bfuzze_98 on Sun, 30 Jan 2022 03:17:25 +0200

2022 Niuke winter vacation algorithm basic training camp 3

I went to visit relatives that day. Later, I vp got away with it. I can only say that I escaped from the real hell (Wuwuwuwu was killed by brother zhinai). 6 in the game and 8 after the game, it was estimated that rank was about 450, so I gave an estimated score A: Successful, 0 B: Backpack, 6 (1) C: dp (supplementary) D: Check in, 2 E: An ...

Added by evil turnip on Sun, 30 Jan 2022 02:13:31 +0200

std::vector>Tp>push_ Implementation principle of back(const Tp&val)

background The std::vector<Tp>container of C++ Standard Library has continuous memory, which has great advantages in some applications, such as the operation compatible with C language. We store n POD type data in vectors, such as std::vector<double>vec(20). I want to empty the data to 0. I can use memset(vec.data(), 0, vec.siz ...

Added by porrascarlos80 on Sun, 30 Jan 2022 01:54:34 +0200

String function and character function

Character classification function Function returns true if its arguments meet the following conditions iscntrl any control character isspace blank characters: space ',' page feed '\ f', line feed '\ n', carriage return '\ r', tab '\ t' or vertical tab '\ v' isdigit decimal digits 0 ~ 9 isxdigit hexadecimal digit, including all decimal d ...

Added by skyagh on Sun, 30 Jan 2022 01:26:32 +0200

CEF is related to MFC embedding

A brief introduction to xiadakeng, 1. To download appropriate compiled class library resources, do not download incomplete or problematic resources. You can search Baidu for the download address of the official website or famous outlets. Of course, I also provided the relevant resources I downloaded, The name is: cef_binary_90.6.7+g19ba721+c ...

Added by chodges on Sun, 30 Jan 2022 01:15:18 +0200

Knapsack problem of dynamic programming (under construction)

knapsack problem 1, 01 knapsack problem   each item can only be selected or not, and each item can only be selected once Topic overview:   title link: 01 knapsack problem Solution:    f(i,j) represents the maximum value when only the first i items are viewed and the total volume is j. Our answer is max{f(n,k),k ...

Added by mrclark219 on Sun, 30 Jan 2022 00:51:23 +0200

Excerpt from C + + actual combat notes

Excerpt from C + + actual combat notes Pre school encouragement Anyone can write code that machines can understand, but only good programmers can write code that people can understand.There are two ways to write programs: one is to write the code so complex that "no obvious errors can be seen"; The other is to write the code so ...

Added by jlr2k8 on Sat, 29 Jan 2022 23:51:21 +0200

Read "computer graphics programming (using OpenGL and C + +)" 4

When drawing an object, its vertex data needs to be sent to the vertex shader. Usually, the vertex data is put into a buffer on the C + + side, and the buffer is associated with the vertex attributes declared in the shader. The steps are as follows: The steps that are only done once are generally placed in init(). 1. Create a buffer. 2. Copy ve ...

Added by fansa on Sat, 29 Jan 2022 21:23:33 +0200

Application of hash -- bitmap

bitmap Bitmap concept Give 4 billion non repeating unsigned integers, which have not been sorted. Given an unsigned integer, how to quickly judge whether a number is in these 4 billion numbers. [Tencent] Idea 1: traversal, time complexity O ( N ...

Added by phphunger on Sat, 29 Jan 2022 20:58:50 +0200

Analysis of std::function source code of C++11

1. Source code preparation This article is based on the analysis of the source code of gcc-4.9.0. std::function is added to the standard only after C++11. Therefore, the lower version of GCC source code does not have std::function. It is recommended to choose 4.9.0 or later version to learn. The difference between different versions of ...

Added by jaybones on Sat, 29 Jan 2022 20:10:00 +0200