摘要: LCA转rmq:链接/*离线版*/const int maxn = 10000;int fa[maxn];int head[maxn],qhead[maxn];struct node{ int to,next,lca;};node edge[maxn],qedge[maxn];int find... 阅读全文
posted @ 2014-07-30 22:37 kewowlo 阅读(130) 评论(0) 推荐(0)
摘要: 根据前序找到在中序的位置 其两端则是其左右节点#include #include #include #include #include #include #include #include #include #include using namespace std;#define MAXN 1111... 阅读全文
posted @ 2014-07-30 19:11 kewowlo 阅读(127) 评论(0) 推荐(0)