In the solution to the problem of enemy troops' Formation & & c + +, cin is a big pit
In c + +, cin is a big pit. Why do you say that? Let's look at the solution first.
The operation of this problem on the line segment tree is very simple (if you are lazy, you don't write the detailed process...), If you don't know the line segment tree, click the link below (this is equal to this question) Important line segment tree algorithm ...
Added by gromer on Wed, 09 Mar 2022 11:53:19 +0200
C + + design pattern basis and basic principles of pattern design
1. Design mode Preface
1.1. pattern
A solution to a problem in a certain environment, including three basic elements – (problem, solution, environment). That is: under certain circumstances, use a fixed routine to solve problems.
1.2. Design pattern
It is a summary of code design experience that is repeatedly used, known by most ...
Added by ecaandrew on Tue, 08 Mar 2022 21:24:18 +0200
c++ Learning Notes 1
c++ Learning Notes 1
I am a beginner of c++. I have made some notes for you to refer to and review. I listened to Mr. Weng Kai's class on Station B. Mr. Weng Kai's class is very good. You can listen to it if you are interested. Sometimes I compare C with c++ because I have a base in C. //
#include <iostream>
#include <stdlib.h>
us ...
Added by pastcow on Tue, 08 Mar 2022 19:32:18 +0200
Introduction to C + + Basics
Introduction to C + + Basics
1. Initial knowledge of C + +
[introduction to C + +]( (31 messages) [C + +] dark horse programmer "C + + from introduction to Mastery"_ Langli xiaofeixia blog - CSDN blog_ Dark horse programmer C++)
1.1 the first C + + program
#include<iostream>
using namespace std;
int main()
{
int a =10 ...
Added by norpel on Tue, 08 Mar 2022 15:13:23 +0200
Simple summary of select, poll and epoll
Simple summary of select, poll and epoll
1.socket
socket is used to represent the special file type of inter process communication. Its essence is the pseudo file formed by the kernel with the help of buffer. socket = IP address (uniquely identifying a host) + protocol + port number (uniquely identifying a process in a host)
2. Process of so ...
Added by miksel on Tue, 08 Mar 2022 14:44:41 +0200
Atlantis [line segment tree + scanline + discretization]
Atlantis [line segment tree + scanline + discretization]
POJ1151,ACwing247
Title:
Several ancient Greek books contain descriptions of the legendary island of Atlantis.
Some of them even include partial maps of the island.
Unfortunately, these maps describe different areas of Atlantis.
Your friend Bill must know the total area of the map. ...
Added by Moharo on Tue, 08 Mar 2022 11:34:00 +0200
LeetCode daily question solution: 2055 Plates between Candles - problem solving - python && C + + source code
Here is a long table with plates and candles lined up on it. Give you a string s with subscript starting from 0 |, which contains only the characters' * 'and' | ', where' * 'represents a plate and' | 'represents a candle.
At the same time, you will be given a two-dimensional integer array {queries with subscript starting from 0}, where {querie ...
Added by karikamiya on Tue, 08 Mar 2022 11:30:18 +0200
STL [algorithm] | large collection of common algorithms
1, Introduction
STL algorithms are designed to handle one or more iterator intervals; In most cases, you only need to provide a starting point;
STL algorithm adopts coverage mode instead of placement mode;
1.1 category
1.1.1 _if end
When this kind of algorithm has two forms and the number of parameters is the same, the first f ...
Added by mwichmann4 on Tue, 08 Mar 2022 10:29:16 +0200
Application and simple simulation of common string functions and memory functions
string .h header file defines a variable type, a macro, several string functions and memory operation functions.
Variable type size_t It is the result of the sizeof keyword. In C language, sizeof() is an operator to judge the length of data type or expression, not a function. It returns the number of memory bytes occupied by an object or ty ...
Added by dajawu on Tue, 08 Mar 2022 07:09:19 +0200
dfs pruning and iterative deepening and bidirectional dfs
1, Question sequence: 1. Consider how to correctly search out all schemes 2. Consider pruning again
1. Optimize search order In most cases, we should give priority to searching nodes with fewer branches. 2. Eliminate equivalent redundancy For example, if the order is not considered, search by combination 3. Feasibility pruning If a scheme is i ...
Added by lhaynes on Tue, 08 Mar 2022 06:57:00 +0200