OSDN Git Service

Update mo-algo-on-tree.md
authorcountercurrent_time <50617959+countercurrent-time@users.noreply.github.com>
Mon, 4 May 2020 04:27:00 +0000 (12:27 +0800)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 04:27:00 +0000 (12:27 +0800)
docs/misc/mo-algo-on-tree.md

index 072c099..a93eb1d 100644 (file)
@@ -43,11 +43,6 @@ dfs 一棵树,然后如果 dfs 到 x 点,就 `push_back(x)` ,dfs 完 x 点
     #include <algorithm>
     #include <cmath>
     #include <cstdio>
-    #include <iostream>
-    ```
-
-    #define DEBUG printf("line:%d func:%s\n", __LINE__, __FUNCTION__);
-
     using namespace std;
 
     const int maxn = 200010;
@@ -89,13 +84,6 @@ dfs 一棵树,然后如果 dfs 到 x 点,就 `push_back(x)` ,dfs 完 x 点
       id[g[x] = ++index] = x;  // 括号序
     }
 
-    inline void swap(int &x, int &y) {
-      int t;
-      t = x;
-      x = y;
-      y = t;
-    }
-
     inline int lca(int x, int y) {
       if (dep[x] < dep[y]) swap(x, y);
       if (dep[x] != dep[y]) {