Shenyang University of Chemical Technology & Qufu Normal University Joint Monthly Competition in January

A . A. A. Come and help Xiaoxin The meaning of the question is very simple, input two strings, find the second string in the first string, output yes if successful, otherwise output no But Xiaoxin is sick, he can't distinguish the thr ...

Posted by riddlejk on Sun, 29 Jan 2023 08:52:45 +0300

Eulerian sieve, Euler sieve (number theory)

Echelon sieve / Euler sieve for prime numbers At the beginning of the beginning, I recommend two videos, uh, my introductory video (let others go elsewhere for the crumbs (bushi) before I start talking) Little broken station (well, this teacher is very vivid) Small broken station (actually I am a fan of this teacher...) Now if you give us a ...

Posted by Eddie Fisher on Wed, 25 Jan 2023 19:41:19 +0300

[Winter vacation practice] day1

foreword If you accumulate steps every day, you can reach a thousand miles. The level is limited, please correct me if there are any deficiencies. multiple choice 1. What is the output of the following code ( ) char a=101; int sum=200; a+=27; sum+=a; printf("%d\n",sum); A:327 B:99 C:328 D:72 analyze The representation range of ...

Posted by LordPsyan on Wed, 25 Jan 2023 10:12:33 +0300

Python Data Structure and Algorithm Analysis Exercises__chapter5

1. Topics for discussion slightly. 2. Programming exercises 1. Conduct a random experiment to test the difference between the sequential search algorithm and the binary search algorithm when processing lists of integers. The binary search algorithm can only search ordered lists, and the sequential search algorithm can search both unorde ...

Posted by trawets on Fri, 20 Jan 2023 16:01:06 +0300

Implementation of the Fruit Fly Optimization Algorithm (FOA) (Python with source code)

1. Implementation idea of ​​fruit fly optimization algorithm Fruit Fly Optimization Algorithm (FOA) is a swarm intelligence optimization algorithm proposed by Pan Wenchao in 2011. It simulates the way fruit flies in nature forage, and compares the position information of food to the optimal solution of optimization problems. The optimal soluti ...

Posted by krysco on Fri, 20 Jan 2023 04:38:33 +0300

Code Random Recording Algorithm Training Camp Day4 | | 24. Exchange nodes in the linked list in pairs, 19. Delete the last N node of the linked list, interview questions 02.07. Linked list intersection, 142. Ring linked list II

24. Exchange the nodes in the linked list two by two Topic link: 24. Exchange Nodes in Linked List - Leetcode encountered difficulties None, but can't think of a recursive method answer 1. Iterative method After understanding the meaning of the question, it can be simply understood as the exchange of several numbers. Due to the speci ...

Posted by mwaw on Sun, 15 Jan 2023 21:28:14 +0300

FPGA Design Bubble Sort

1. Write in front   In the front, we have learned the principle of parallel full sorting algorithm and double tone sorting algorithm and the writing of RTL code. In this article, we will continue to learn the classic sorting algorithm - bubble sorting algorithm, learn its principle and its Verilog implementation . 2. The principle of bubb ...

Posted by tryin_to_learn on Sun, 15 Jan 2023 15:02:24 +0300

Codeforces Round #843 (Div. 2) A ~ C Solution

A1&A2 Gardener and the Capybaras Title meaning Simple version: A1 Hard version: A2 A string contains only two letters a and b. Please divide this string into three non-empty strings so that the lexicographical order of the second string is the largest or the smallest. The data range of the hard version requires that the problem be solved ...

Posted by cbullock on Thu, 12 Jan 2023 20:11:38 +0300

C++ Primer Plus Exercises and Answers - Chapter 16

Exercises are selected from: C++ Primer Plus (Sixth Edition) The content is for reference only, please correct me if there is any mistake! Smart pointer template class review questions 1. Consider the following class declaration: class RQ1 { private: char * st; // points to C-style string public: RQ1() { st = new char [1]; ...

Posted by mike0193 on Tue, 10 Jan 2023 08:07:29 +0300

Algorithm training camp DAY2_Squaring of ordered arrays, subarrays with the smallest length, spiral matrix II

LeetCode | 977. Squaring an Ordered Array topic: Given an array of integers nums sorted in non-decreasing order, return a new array consisting of the square of each number, also sorted in non-decreasing order. 977. Squaring an Ordered Arrayhttps://leetcode.cn/problems/squares-of-a-sorted-array/ think: When I first thought about the solutio ...

Posted by bloo on Sat, 31 Dec 2022 14:42:36 +0300