Chapter 5 #5.2 graph traversal and Application

Graph traversal: starting from a vertex of a connected graph, access and traverse all vertices in the graph along some edges, and each vertex is accessed only once. This is called graph traversal, which is the basic operation of the graph Traversal essence: the process of finding the adjacency point of each vertex Characteristics of graph: ...

Posted by praveenhotha on Wed, 29 Dec 2021 21:51:23 +0100

VScode usage guide (environment configuration, plug-in recommendation, beautification) (C++,Python,LaTeX,R...)

This article records my experience of using vscode for one year. I learned git, json and regular (go to hell qwq) for this editor Just stop talking about that pile of nonsense and start directly! 1. Installation open Official website Download directly (beta insider is recommended), During installation, there are several checkmarks on one int ...

Posted by jonathen on Wed, 29 Dec 2021 21:30:42 +0100

OJ 1576 user password login continuous failure locking problem

#include<iostream> #include<vector> #include<string> #include<list> #include<utility> #include<stdlib.h> using namespace std; bool isfind_ch(vector<pair<char, int>> vec, char ch) { //Is there a pair with ch as the key in char tmpt; tmpt = toupper(ch); //All uppercase storage for (int i = (v ...

Posted by msinternet on Wed, 29 Dec 2021 19:30:45 +0100

Operation of IO stream and file

1. Input / output concept Standard input and output, referred to as standard I/O, that is, keyboard input data and input data from the screen File input / output, referred to as file I/O, inputs data from disk files and outputs the results to disk files. 2. Input / output stream Stream: data flows from one place to another like water. C ...

Posted by vangelis on Wed, 29 Dec 2021 15:59:55 +0100

Writing of subclass constructor in C + + inheritance

Reproduced at: https://www.cnblogs.com/shmilxu/p/4849097.html The constructor is used to initialize the object of the class. Unlike other members of the parent class, it cannot be inherited by the subclass (a subclass can inherit all member variables and member methods of the parent class, but does not inherit the constructor of the parent clas ...

Posted by jaql on Wed, 29 Dec 2021 14:41:12 +0100

Starting from scratch

catalogue 1. Menu interface 2.game() function 2.1 defining arrays 2.2 initialize the chessboard 2.3 print the initialization chessboard and construct the chessboard pattern 2.4 players play chess and print the board PlayerMove(board,ROW,COL) 2.5 computer playing chess and printing ComputerMove(board,ROW,COL) 2.6 judgment of winning and ...

Posted by sebastiaandraaisma on Wed, 29 Dec 2021 07:07:12 +0100

[ACWing] 4228. Eight digital II

Title address: https://www.acwing.com/problem/content/description/4231/ In a 3 × 3 3×3 three × In the grid of 3, 1 ∼ 8 ...

Posted by sandingmachine on Wed, 29 Dec 2021 00:43:46 +0100

c + + algorithm notes (under update)

algorithm Sorting algorithm There are basically eight sorting algorithms Bubble sortingInsert sortHeap sortSelect sortQuick sortMerge sortCardinality sortShell Sort Of course, it is not required to fully master all sorting methods. Nevertheless, it is necessary to understand the implementation principle. This provides ideas for us to e ...

Posted by gtal3x on Tue, 28 Dec 2021 23:51:32 +0100

C + + classes and objects (medium)

C + + classes and objects (medium) preface Continue to learn C + + classes and objects today Class 1. Constructor class Date { public: Date() { _year = 0; _month = 0; _day = 0; } private: int _year; int _month; int _day; }; void main() { Date d1; } Concept: The constructor is a special member function with the same nam ...

Posted by feelay on Tue, 28 Dec 2021 16:53:13 +0100

vector introduction and basic use

I vector introduction vector document vector is a sequence container that represents a variable size array. Like arrays, vectors use continuous storage space to store elements. This means that you can use subscripts to access the elements of a vector, which is as efficient as an array. But unlike an array, its size can be changed dynamic ...

Posted by ggkfc on Tue, 28 Dec 2021 15:30:43 +0100