Given \ (n \) red points and \ (n \) blue points on the two-dimensional plane, each point has a point weight.
\(q \) queries, each given \ (L,R \). It is required to find a red dot \ ((rx,ry) \) (weight value \ (rv \)) and a blue dot \ ((bx,by) \) (weight value \ (bv \)), which meet the following requirements: \ (ry < by \)\ (Rx ...
Added by mu-ziq on Wed, 26 Jan 2022 22:58:57 +0200
This problem mainly uses the single point modification of the line segment tree and the operation of interval summation.
Or use the interval summation operation of the tree array
Title Link: https://acm.hdu.edu.cn/showproblem.php?pid=1166
Country A, the sworn enemy of country C, is conducting ...
Added by cuvaibhav on Tue, 28 Dec 2021 05:46:29 +0200
What I want to share with you today is a tree array. What is a tree array? According to the name, we can roughly deduce that we use our common array to simulate the tree structure. So what problems can he solve? I'll explain it at the end.
First, let's talk about what the tree leader looks like?
In this picture, we can see an array with ...
Added by skatermike21988 on Thu, 23 Dec 2021 07:26:30 +0200
1, What is the of a tree array
We first need to understand what a tree array is. A tree array is a data structure. Its main function is to efficiently realize interval summation and single point modification. We can know that the most efficient interval summation is computation Prefix and Array thus
Added by ace21 on Wed, 10 Nov 2021 19:34:01 +0200
Given a rootless tree with \ (n \) points, define its deletion sequence: delete the leaf node with the smallest number in the tree and add it to the end of the sequence each time.
There are \ (q \) operations, which are divided into three types: set the number of a node to the maximum number of other nodes \ (+ 1 \); Query the posit ...
Added by wilorichie on Wed, 10 Nov 2021 03:25:56 +0200