Write your own full C language version of the memset function and evaluate the performance and portability of this implementatio

... Write a full C language version of the memset function and evaluate the performance and portability of this implementation. The function of memset can be understood as the replacement of the specified byte length from the address pointed to by the pointer to the specified value. Then we...


C++11 multi-threading (1)

... C++11 added duox multi-threaded class, writing C++ program can directly use multi-threaded library in C++11, do not have to rely on platform multi-threading, so you can Convenient to write a multi-threaded program that boasted the platform. Multi-threading maximizes the use of computer...


2018.09.24 bzoj1867: [Noi1999] nails and balls (probability dp)

... 传门 Probability dp classic questions. If the current location ( i , j ) (i,j) ( i , j ) has nails, then the probability of falling to ( i + 1 , j ) , ( i + 1 , j + 1 ) (i+1,j),(i+1,j+1) ( i + 1 , j ) , ( i + 1 , j + 1 ) is 1/2. And if there is no nail, then the probability of falling to ...


Am I late, do I still have food?

... 2018 September 23 years old now turn it is too late 不晚晚不知道, the original road can not get through, always find another way, fortunately there is a guide, although and It’s not a technical route. It’s not a big problem to guide me into the business. 本科电气自动化, tested the power grid, seems...


c++ multi-threaded instance

... mainly summarizes the multi-threaded function CreateThread based on C++, the mutex lock (or resource exclusive) function CreateMutex, waits for the resource function WaitForSingleObject, closes the thread function (actually closes the handle of the thread) CloseHanlde, release The usage...


Codeforces Round #511 (Div. 2)

... A Title: 给一个数, break this number into three multiples that are not 3 There are many solutions, you can construct #include <bits/stdc++.h> using namespace std; int main() { int n;cin>>n; if((n-2)%3==0) cout<<"1 2 "<<n-3; else cout<<"1 1 "<<n-2; //cout...


Silk Rain Sister Cookery Class - Week 1

... The Story is Just Beginning @1000 Super Mario Games Use "xxx\n" to output each line of content separately P1001 A+B Problem Hello, World! 14221 Circle and corner decimal, converted to the same unit for calculation. Integer division wipes zero. P1425 Swimming time of small fish Same as...


2018 ccpc Jilin station D problem solution The Moon

... did not write when the game did not lead to silver, autism. I started thinking about the probability dp, but I didn't think of the initial state, I went to push the formula, (thinking is rigid). is q for the dp array subscript. When q is 100%, the expected number of steps is 1/p. Push...


c++ memory management

... c++ memory allocation method In C++, memory is divided into 4 areas, they are heap / free storage area, stack, global / static storage area and constant storage area. Stack : When the function is executed, the storage units of the local variables in the function can be created on the...


Nginx installation and configuration

... 1, installation preparation Since some modules of nginx depend on some lib libraries, all of them need to install these lib libraries yum install gcc-c++ yum install pcre pcre-devel yum install zlib zlib-devel yum install openssl openssl-devel 2, install nginx # 1. Check if nginx is...