qtree专题

SPOJ - QTREE (树链剖分)

基础的树链剖分题目,不过是边权,可以向下映射成点权或者按边剖分。 VIEW CODE #include <iostream>#include<stdio.h>#include<cmath>#include<string.h>#include<algorithm>#include<string>using namespace std;const int mmax=100

SPOJ QTREE 树链剖分 边上剖分

题目链接:http://bak2.vjudge.net/problem/13013/origin #include <cstdio>#include <cstring>#include <algorithm>#define sf scanf#define pf printfusing namespace std;/** Edge */const int maxn = 10000 +