set container of C++STL

Set is a kind of Standard Association container (vector,list,string,deque are all sequence containers, while set, multiset, map, multimap are standard association containers) in STL. Its bottom layer is realized by using a balanced search tree red black tree. When inserting and deleting operations, only pointer operation nodes are needed, and m ...

Posted by mickey9801 on Tue, 31 Mar 2020 06:28:19 -0700

UCF Local Programming Contest 2016 March 28, 2020

A. Majestic 10 Title: Give you three numbers. You can tell how many of them are big fish equal to 10 and print the relevant output according to the number. Solution: This is a simple check-in question, simple. Code: 1 #include<iostream> 2 #include<cstring> 3 #include<algorithm> 4 #define ll long long 5 using namespace st ...

Posted by lozza1978 on Mon, 30 Mar 2020 18:33:08 -0700

Uoj × 34. Polynomial multiplication (NTT)

This is a template problem. Here are two polynomials. Please output the multiplied polynomials. Input format In the first line, two integers nn and mm represent the degree of two polynomials respectively. The second line, n+1n+1 integers, represents the coefficients of the terms from 00 to nn of the first polynomial. The third line m+1m+1 ...

Posted by phpvolution on Thu, 26 Mar 2020 09:03:46 -0700

VSCode configures C + + development environment

Catalog Install VSCode application Install related plug-ins Chinese plug-in C + + editor plug in Write profile tasks.json launch.json c_cpp_properties.json Step 1: install VSCode application Open up VSCode official website , download the corresponding installation package and install by default (note here: the installation path can ...

Posted by apw on Wed, 25 Mar 2020 10:52:38 -0700

Implementation with C + +: loop data retrieval

Problem description Loop fetching is fetching along the edge of the matrix. If there are countless or have been fetched in the current direction, turn 90 degrees to the left. It starts at the top left corner of the matrix and goes down. Input format The first input row is two positive integers m, n, representing the rows and columns of the matr ...

Posted by peppino on Wed, 25 Mar 2020 08:00:10 -0700

Function overloading in C + + classes

We know that C + + is very important: 1. Global function, 2. Ordinary member function, 3. Static member function.   The overloads of member functions in a class are as follows: 1. Overload of constructor. 2. Overload of common member function. 3. Overload of static member function. Example: 1 #include <stdio.h> 2 3 class Test 4 ...

Posted by xiao on Tue, 24 Mar 2020 08:01:40 -0700

Performance differences between exception handling, dynamic memory requests, and different compilers

Continue with the previous section Exception handling in c++ ... Catalog   1. What happens when an exception is thrown in the main() function   2. What happens when an exception is thrown in a destructor   3. Exception specification of functions     4. Analysis of Dynamic Memory Request Results    5. New usage of new keywords 1. What ...

Posted by thelinx on Sun, 22 Mar 2020 22:11:49 -0700

CodeForces 1320D - Reachable Strings

Luogu title page portal & CodeForces title page portal There is a 01 string \ (a,|a|=n \). \110} \). \(n,q\in\left[1,2\times10^5\right]\). Consider the necessary and sufficient conditions under which the analysis can be made equal by several operations. It is not difficult to find that it is impossible to change the number of \ (\ ...

Posted by kevbev16 on Fri, 20 Mar 2020 03:12:13 -0700

Player nickname generator の implementation C++

When we register the game, some user name games can be generated automatically. Let's take you to realize this function    Train of thought: Use several containers to store many strings, and then use random numbers to call TA S Here we use the string array, which is the code: cout<<Where[rand()]<<"Of"<<Describe[rand()]&lt ...

Posted by SP8600 on Thu, 19 Mar 2020 11:23:38 -0700

Line tree learning materials

Preface: Originally decided to learn data structure to learn things, the result has been Gu until now.. Line tree is a kind of advanced data structure. It is a kind of binary tree, that is to say, for a line segment, we will use a binary tree to represent it. Text: Line tree can do single point query, single point modification, interval query, ...

Posted by legio on Thu, 19 Mar 2020 03:49:55 -0700