并查集
文章平均质量分 87
兔兔不爱吃萝卜
加油!!!!
展开
-
K - Rochambeau(并查集,枚举)
N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don’t know who is the judge, or how the children are grouped. Th原创 2021-08-09 10:13:14 · 77 阅读 · 0 评论 -
G - Navigation Nightmare(并查集)
Farmer John’s pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1…N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying lengths (1 <= length <= 1000) connect the farms. A map of thes原创 2021-08-07 18:46:11 · 75 阅读 · 0 评论 -
D - Supermarket(并查集+贪心)
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sale begins. Each product takes precisely one unit of tim原创 2021-08-06 15:37:57 · 273 阅读 · 0 评论 -
B - Is It A Tree?
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties. There is exactly one node, called the root, to which no directe原创 2021-08-05 14:35:56 · 123 阅读 · 0 评论 -
S - Corporative Network(并查集)
A very big corporation is developing its corporative network. In the beginning each of the N enterprises of the corporation, numerated from 1 to N, organized its own computing and telecommunication center. Soon, for amelioration of the services, the corpor原创 2021-08-05 09:52:18 · 58 阅读 · 0 评论