
并查集
文章平均质量分 88
RJ28
小学生
展开
-
Codeforces Round #363 (Div. 2) D. Fix a Tree (并查集)
A tree is an undirected connected graph without cycles. Let's consider a rooted undirected tree with n vertices, numbered 1 through n. There are many ways to represent such a tree. One way is to cre原创 2016-07-20 10:17:21 · 541 阅读 · 0 评论 -
Codeforces Round #416 (Div. 2) E. Vladik and Entertaining Flags(线段树+并查集)
In his spare time Vladik estimates beauty of the flags. Every flag could be represented as the matrix n × m which consists of positive integers. Let's define the beauty of the flag as number of原创 2017-07-17 22:26:57 · 366 阅读 · 0 评论