School of magic "difference + greed", "line segment tree + greed", "parallel search + greed" and "Kodori tree"

School of magic Title Description: Yako likes to collect visible characters without spaces (ASCII code is 33 ~ 126). In her eyes, the value of a character is its ASCII code size, such as the value of 'a' is 97. So far, she has collected n visible characters excluding spaces, and the ith character is Si. But she wanted to maximize the val ...

Added by mattsutton on Tue, 22 Feb 2022 15:59:10 +0200

[algorithm problem inductive set] graph theory - typical application of minimum spanning tree

1, AcWing 1140 Shortest network [Title Description] Farmer John was elected mayor of his town! One of his campaign promises is to build an Internet in the town and connect to all farms. John has arranged a high-speed network line for his farm. He wants to share this line with other farms. What's the number of John's farm ...

Added by dgny06 on Sat, 05 Feb 2022 05:35:11 +0200

Use and example records of parallel search set (P1536 & P1551)

1, Overview of parallel search set 1. Related concepts (1) Introduction of union search set problem There are several sets, {a},{b},{c},{d},{e} Design two methods Judge whether two elements are in the same set, issameset(a, b)Merge the set of elements a and B into union(a, b) Solution Identify a representative element for each c ...

Added by happs on Thu, 06 Jan 2022 16:24:05 +0200

Thematic breakthrough 3: parallel search collection -- Portal, parity, food chain, automatic program analysis, almost union find, cave survey

Portal source Baidu translation is a ghost... ((M - _-) M off-line Sort the edges and queries by weight, the pointer, and the ownership value will not exceed the current query i i Add all the edges of i The answer path is naturally two disconnected points ...

Added by ++Sti++ on Fri, 24 Dec 2021 03:20:32 +0200

Xiao Xie's Labyrinth HDU-1272

What does the writing of the function in this question reflect compared to a common union set? Specific problems specific analysis is the living soul of Marxism There are many things to note about this topic But the root is still a collection. Thousands of waistcoats belong to As for what to pay attention to...... Do you know how I spent th ...

Added by phillips321 on Sat, 27 Nov 2021 19:27:19 +0200