随笔分类 -  图论—树上启发式合并

摘要:Once there was a rooted tree. The tree contained n nodes, which were numbered 1,…,n. The node numbered 1 was the root of the tree. Besides, every node 阅读全文
posted @ 2021-11-11 10:57 脂环 阅读(106) 评论(0) 推荐(0) 编辑
摘要:507. Treediff Time limit per test: 0.25 second(s) Memory limit: 262144 kilobytes input: standard output: standard Andrew has just made a breakthrough 阅读全文
posted @ 2021-11-10 17:34 脂环 阅读(104) 评论(0) 推荐(0) 编辑
摘要:You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour. Let's call colour c dominating in the subtree of vertex v i 阅读全文
posted @ 2021-11-10 10:38 脂环 阅读(52) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩