摘要:
A、POJ3159 Candies 题目描述 During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse 阅读全文
摘要:
//dfs预处理出每个节点的深度和2的x方级祖先节点 void dfs(int now,int fa,int da){ //now为当前节点,fa为父亲节点,da为父亲节点和儿子节点所连边的边权 cost[now][0]=da; zx[now][0]=fa; dep[now]=dep[fa]+1; 阅读全文