Introduction to Niuke algorithm Mathematics: 1001-1006 prime numbers

0x00 topic source Special topics in Mathematics 0x10 Tag Mathematics, prime, Euler sieve 0x20 1001 prime judgment Give a number x, judge whether it is a prime number, and output all its prime factors. 0x21 prime sieve (Euler sieve) The boards are as follows: bool isnp[MAXN]; vector<int> primes; void init(int n) { for (i ...

Posted by stonefish on Mon, 14 Feb 2022 09:07:33 +0100

LeetCode 148. Sort linked list

subject Give you the head node of the linked list. Please arrange it in ascending order and return the sorted linked list. Example 1: Input: head = [4,2,1,3] Output: [1,2,3,4] Example 2: Input: head = [-1,5,3,4,0] Output: [- 1,0,3,4,5] Example 3: Input: head = [] Output: [] Tips: The number of nodes in the linked list is in th ...

Posted by F.Danials on Mon, 14 Feb 2022 09:01:46 +0100

Linux partition details

Linux partition details It is divided into two parts 1. Hard disk partition when installing Linux system. 2. Linux add hard disk partition 1. Hard disk partition when installing Linux system. Usually, the hard disk is about 500G. 1.1 partitions that must exist /The partition that must exist when partitioning. All level-1 directories are ...

Posted by dwest on Mon, 14 Feb 2022 08:32:45 +0100

Develop their own team's front-end development specification documents

Naming conventions Project naming All are in lowercase. When multiple words are included, use the middle dash (-) to separate them. Example: my project name Directory naming Refer to project naming rules; When there is a plural structure, the plural naming method shall be adopted. Examples: utils, images, modes In vue's project, the comp ...

Posted by jovanross on Mon, 14 Feb 2022 08:05:04 +0100

muduo library base source code analysis IV (thread encapsulation)

Thread identifier: we know that every Linux process has a pid, type pid_t. Obtained by getpid(). POSIX thread under Linux also has an id, type pthread_id, by pthread_self(), the id is maintained by the thread library, and its id space is independent of each process (that is, threads in different processes may have the same id). The thread imple ...

Posted by nagrgk on Mon, 14 Feb 2022 07:58:46 +0100

[nearest public ancestor] [biggest bottleneck tree] car 51Nod3061

Planet A has n cities, numbered from 1 to N, with m two-way roads between them. Each road has A weight limit for vehicles, referred to as weight limit. Now there are q trucks transporting goods. Xiao Ming wants to know the maximum load of each truck under the condition of not exceeding the vehicle weight limit. Input Two integers n,m in the f ...

Posted by littledragon on Mon, 14 Feb 2022 07:40:23 +0100

. NET Core(.NET 6) console application and MongoDB Atlas getting started sample tutorial details

Note: This article was first published in Code friend network–<Introduction to. NET Core(.NET 6) console application and MongoDB Atlas> . NET Core(.NET 6) console application and MongoDB Atlas getting started sample tutorial details summary MongoDB is a database based on distributed file storage and written in C + + language. It aims ...

Posted by MatrixDancer on Mon, 14 Feb 2022 07:24:41 +0100

Fine tune the target detection model based on torchvision 0.3 (official tutorial of pytorch)

In this tutorial, we will fine tune the pre trained Mask R-CNN for pedestrian detection and segmentation in Penn Fudan database Model. It contains 170 images and 345 pedestrian instances. We will use it to illustrate how to use the new function in torchvision Yes, so as to train the instance segmentation model on the user-defined data set. ...

Posted by sofasurfer on Mon, 14 Feb 2022 07:19:08 +0100

Selenium+Python download and upload files

catalogue This article records the automated test script I wrote using Selenium. The function is to download files from the web page and upload the downloaded files to another page. At the same time, some problems and solutions encountered in the process of writing are recorded Download file function Google browser download settings Ent ...

Posted by Sorrow on Mon, 14 Feb 2022 07:05:16 +0100

Leetcode3-4 (longest substring without repeated characters, finding the median of two positive arrays)

1. Longest substring without repeated characters ① Violent solution According to the topic, convert the string to char type, cycle once, and then use a temp variable of temporary StringBuffer type for judgment. If the current byte does not exist in the temp string, it will be traced. Otherwise, it will be intercepted, and then continue to run ...

Posted by TCovert on Mon, 14 Feb 2022 06:51:08 +0100