Code Library Of Others/sgtlaugh/HLD + RMQ On Edges.cpp
int query(int u, int v){
        int l = lca(u, v), res = NIL;
        res = OPT(res, query_tree(u, l));
        res = OPT(res, query_tree(v, l));
        return res;
    }
/// Sum of all edges in the path from u to v
Sum of all edges in the path from u to v
Sum of all edges in the path from u to v
int query(int u, int v){
        int l = lca(u, v), res = NIL;
        res = OPT(res, query_tree(u, l));
        res = OPT(res, query_tree(v, l));
        return res;
    }
int query ( int u , int v ) { int l = lca ( u , v ) , res = NIL ; res = OPT ( res , query_tree ( u , l ) ) ; res = OPT ( res , query_tree ( v , l ) ) ; return res ; }
Sum of all edges in the path from u to v
Sum of all edges in the path from u to v