```cpp
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#define _ int
#define __ void
#define ___ bool
#define ____ inline
#define _____ 103
#define ______ struct
#define _________ vector
#define __________ queue
#define ___________ map
#define ______________ continue
#define _______________ getchar
#define ________________ for
#define _________________ if
#define __________________ while
#define ___________________ push_back
#define _________________________ putchar
#define __________________________ return
#define __________________________________ exp
#define ___________________________________ log
#define ____________________________________ sqrt
#define mian main
using namespace std;
______ _______{
_ v,w;
_______(_ v=0,_ w=0):v(v),w(w){}
};
_ ___________________________[_____],_____________________________[_____];
_ ______________________________[_____],_______________________________[_____];
___________<_,_> ____________;
__________<_> _________________________________;
_ _____________________________________,______________________________________;
_ ________________________________________,_______________________________________;
___ ________________________________[_____];
_________<_______> ________[_____];
____ __ _____________(_ &x);
__ ____________________(_ u);
__ _____________________(_ u,_ len,_ w);
__ ______________________(_ u,_ fa);
__ _______________________(_ u,_ fa);
__ ________________________(_ x);
____ _ _________________________________________(_ a,_ b);
_ mian(){
________________________________________ = __________________________________(2*___________________________________(____________________________________(3)));
_ a,b,__________________________________;
_____________(a),_____________(b);
________[1].___________________(_______(2,a));
________[2].___________________(_______(1,a));
________[2].___________________(_______(3,b));
________[3].___________________(_______(2,b));
_______________________________________ = ______________________________[_____________________________________] = ________________________________________;
_______________________(1,0);
____________________(_____________________________________);
___________________(1){
__________________________________ = _________________________________.front();
_________________________________.pop();
_________________(!____________[__________________________________]) ______________;
_________________(__________________________________==a||__________________________________==b) ______________;
________________________(__________________________________);
__________________________ ~~(0^0);
}
}
____ _ _________________________________________(_ a,_ b){
_________________(a>b) __________________________ a;
__________________________ b;
}
__ _____________________(_ u,_ len,_ w){
______________________________________ = 0;
_____________________________[u] = len;
______________________(u,0);
________________(_ i=1;i<______________________________________;++i){
________________(_ j=i+1;j<=______________________________________;++j){
_ tp = _______________________________[i]+_______________________________[j];
____________[tp] += w;
_________________________________.push(tp);
}
}
}
__ ______________________(_ u,_ fa){
_______________________________[++______________________________________] = _____________________________[u];
_ v,l = ________[u].size();
________________(_ i=0;i<l;++i){
v = ________[u][i].v;
_________________(________________________________[v]||v==fa) ______________;
_____________________________[v] = ________[u][i].w+_____________________________[u];
______________________(v,u);
}
}
__ ____________________(_ u){
________________________________[u] = 1;
_____________________(u,0,1);
_ v,l = ________[u].size();
________________(_ i=0;i<l;++i){
v = ________[u][i].v;
_________________(________________________________[v]) ______________;
_____________________(v,________[u][i].w,-1);
_______________________________________ = ___________________________[v];
_____________________________________ = 0;
______________________________[_____________________________________] = ________________________________________;
_______________________(v,u);
____________________(_____________________________________);
}
}
__ _______________________(_ u,_ fa){
_ v,l = ________[u].size();
___________________________[u] = 1;
________________(_ i=0;i<l;++i){
v = ________[u][i].v;
_________________(v==fa||________________________________[v]) ______________;
_______________________(v,u);
___________________________[u] += ___________________________[v];
______________________________[u] = _________________________________________(______________________________[u],___________________________[v]);
}
______________________________[u] = _________________________________________(______________________________[u],_______________________________________-___________________________[u]);
_________________(______________________________[u]<______________________________[_____________________________________]) _____________________________________ = u;
}
#undef ___________________
#undef _____
#undef ______
#define ___________________ char
____ __ _____________(_ &x){
x = 0;
___ _____ = 0;
___________________ ______ = _______________();
__________________(______<'0'||______>'9'){
if(______=='-') _____ = 1;
______ = _______________();
}
__________________(______>='0'&&______<='9'){
x = (x<<3)+(x<<1)+(______^48);
______ = _______________();
}
x = _____?-x:x;
}
__ ________________________(_ x){
_________________(x<0){
_________________________('-');
________________________(-x);
__________________________;
}
_________________(x>9) ________________________(x/10);
_________________________(x%10+'0');
}
```
by NaCly_Fish @ 2019-02-19 11:31:27
下划线大法好Orz
by OvOAuto @ 2019-02-19 11:33:58
push_back 和 while 混了
by 小粉兔 @ 2019-02-19 11:34:18
目测你谷又一毒瘤贴(逃
by OvOAuto @ 2019-02-19 11:34:27
dalao您装弱
by 樱初音斗橡皮 @ 2019-02-19 11:34:35
火钳刘明
by _WA自动机 @ 2019-02-19 11:35:13
我 AC 了
https://www.luogu.org/recordnew/show/16484301
by 小粉兔 @ 2019-02-19 11:35:31
@[小粉兔](/space/show?uid=10703) orz
by NaCly_Fish @ 2019-02-19 11:36:20
@[小粉兔](/space/show?uid=10703) Orz dalao
by OvOAuto @ 2019-02-19 11:36:40
瑟瑟发抖
by OvOAuto @ 2019-02-19 11:37:10