摘要: 1107 Social Clusters (30分) When register on a social network, you are always asked to specify your hobbies in order to find some potential friends wit 阅读全文
posted @ 2020-10-21 22:49 tao10203 阅读(166) 评论(0) 推荐(0)
摘要: 并查集 并查集是一种维护集合的数据结构,它的名字中并、查、集三个字分别取自合并(Union),查找(Find),集合(Set).也就是说,并查集支持下面两个操作: 合并 查找 那么并查集是用什么实现的呢?其实就是一个数组; int father[MAXN]; 其中father[i]表示i的父亲节点 阅读全文
posted @ 2020-10-21 21:58 tao10203 阅读(78) 评论(0) 推荐(0)
摘要: 1064 Complete Binary Search Tree (30分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left 阅读全文
posted @ 2020-10-21 15:25 tao10203 阅读(111) 评论(0) 推荐(0)