随笔分类 - dfs序 、 欧拉序
摘要:Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text p . Her job is relatively simple -- just to find the first
阅读全文
摘要:You are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose number is less than i in all
阅读全文
摘要:推荐博客 :https://www.cnblogs.com/stxy-ferryman/p/7741970.html DFS序其实就是一棵树顺次访问的结点的顺序,例如下面这棵树 它的 dfs 序就是 A-B-D-E-G-C-F-H 我们这里的 dfs_[ ] 数组表示的就是这棵树的 dfs 序,s[
阅读全文