Couleur (chairman tree + heuristic splitting)

I learned dsu on tree a long time ago, but I didn’t expect heuristic splitting Couleur Question meaning: Given a sequence, one operation can invalidate one position. Given the sequence of operations (hidden through XOR, forced online), find the maximum number of reverse sequences in the continuous sub-interval without invalid positions after each operation. Each […]

Transmission line fault diagnosis (Python code, five different diagnosis methods: logistic regression, decision tree, random forest, XGBoost and support vector machine)

Effect video: Transmission line fault diagnosis (Python code, five different diagnosis methods of logistic regression, decision tree, random forest, XGBoost and support vector machine)_bilibili_bilibili project files code.py loads the English version, with English labels and coordinates displayed on the picture. Chinese.py loads the Chinese version, with Chinese labels displayed on the picture, etc., and almost […]

Binary tree sequential storage structure

Table of Contents 1. Binary tree sequential storage structure 2. Concept and structure of heap 3. Heap related interface implementation 3.1 Heap insertion and upward adjustment algorithm 3.1.1 Upward adjustment algorithm 3.1.2 Heap insertion 3.2 Heap deletion and downward adjustment algorithm 3.2.1 Downward adjustment algorithm 3.2.2 Heap deletion 3.3 Other interfaces and code implementations 4. […]

110. Balanced Binary Tree

110. Balanced Binary Tree 1. Question description 2. Supplementary content 3. Ideas for this question 3.1 Recursion 3.1.1 Clarify the parameters and return values of recursive functions 3.1.2 Clear termination conditions 3.1.3 Clarify the logic of single-level recursion 3.2 Iteration 4. Summary 5. Specific code implementation 5.1 Recursive method 5.2 Iterative method 5.3 Optimization iteration […]

Codeforces Beta Round #19 D Segment Tree

D. Points time limit per test2 seconds memory limit per test256 megabytes Pete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point (0,?0) is located in the bottom-left corner, Ox axis is directed right, Oy axis is directed up. Pete […]