ICode9

精准搜索请尝试: 精确搜索
  • POJ2763 Housewife Wind (树链剖分)2022-07-01 20:37:52

    差不多是模板题,不过要注意将边权转化为点权,将边的权值赋给它所连的深度较大的点。 这样操作过后,注意查询ask()的代码有所改变(见代码注释) 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 const int maxn=100010; 6 int head[m

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有