Codeforces Good Bye 2021: 2022 is NEAR ABCDE
A. Integer Diversity
Count the number of figures with different absolute values in all figures. Only when the number of absolute values is less than 2
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf=0x3f3f3f3f;
const int N=200100;
int n,m,t;
int w[N];
int cw[N];
int main(){
cin>>t;
while(t--) ...
Added by jibosh on Wed, 05 Jan 2022 03:22:05 +0200
Binary tree recursive routine: judge whether the binary tree is the maximum distance to search binary tree and binary tree
This article continues to talk about the recursive routine of binary trees.
1, Determine whether the binary tree is a search binary tree
Search binary tree definition: for any subtree with X as the head in a binary tree, the left subtree is smaller than X and the right subtree is larger than x. (the classic search binary tree has no dupli ...
Added by lonerunner on Wed, 05 Jan 2022 02:56:52 +0200
29 personal training summary
I went to the hospital in the afternoon. I could only finish the sign in question of the competition over there. It's really uncomfortable that I can't do two questions without making up and solving them now
codeforce 1551 B2 title link: Click here to transfer
Meaning: give n elements and their numbers, as well as the types and numbers of pig ...
Added by cloudzilla on Wed, 05 Jan 2022 02:53:03 +0200
Computer experiment of data structure (Chapter 2) II
Bibliography: data structure course (Fifth Edition), edited by Li Chunbao Computer experiment of data structure (Chapter II) I
Time complexity:
Find elements with sequence number i(1 ≤ i ≤ n)Find the first element with a value of xInsert a new element as the first elementInsert the new element as the last elementInsert the i(2 ≤ i &l ...
Added by wee493 on Wed, 05 Jan 2022 01:13:18 +0200
Data structure - stack
Learn about today's record stack
Stack
Stack (stack) A stack is an ordered list of Filo first in last out. Stack is a special linear table that restricts the insertion and deletion of elements in a linear table to the same end of the linear table. The end that allows insertion and deletion is the changing end, which is called the top of t ...
Added by ferpadro on Tue, 04 Jan 2022 23:47:47 +0200
Sword finger Offer 37 Serialized binary tree
Please implement two functions to serialize and deserialize the binary tree respectively.
You need to design an algorithm to realize the serialization and deserialization of binary tree. There is no restriction on the execution logic of your sequence / deserialization algorithm. You only need to ensure that a binary tree can be serialized into ...
Added by AngusL on Tue, 04 Jan 2022 23:05:31 +0200
Introduction to pattern recognition (Experiment 3) digital recognition based on perceptron algorithm
Test requirements:
1. Data set:
a) training data set: "experimental image" - training set "contains 10 subdirectories of" 0 "," 1 ",...," 9 ", and each subdirectory contains corresponding digital images. For each number, there are 20 64 × 64 training images.
b) test data set: "experimen ...
Added by xionhack on Tue, 04 Jan 2022 22:31:51 +0200
SpringBoot+WebSocket real-time monitoring exception
Write in front
This exception is not another exception. The exception mentioned in the title is a business exception.
Recently, I made a demand for fire equipment inspection. If any abnormality is found in the inspection, submit it through the mobile terminal, and obtain the information and location of the equipment in real time on the backgr ...
Added by AdB on Tue, 04 Jan 2022 22:01:11 +0200
[summary of Li Kou brushing questions] (dictionary tree)
Dictionary tree
Concept of dictionary tree
This section is mainly for reference Reference link
Dictionary tree is also called Trie tree and prefix tree. As the name suggests, it is a data structure that maintains strings.
Dictionary tree, as the name suggests, is a tree about "dictionary". That is, it is a storage method for ...
Added by Txtlocal on Tue, 04 Jan 2022 19:51:41 +0200
Weekly leetcode - binary tree 129/124/112/113/104/101/105/108/offer32/102/144
leetcode - 129. Find the sum of numbers from root node to leaf node
Give you the root node of a binary tree, root. Each node in the tree stores a number between 0 and 9. Each path from the root node to the leaf node represents a number: For example, the path 1 - > 2 - > 3 from the root node to the leaf node represents the number 123 ...
Added by plowter on Tue, 04 Jan 2022 19:20:18 +0200