#include #define to edge[i].v #define mp make_pair #define rint register int #define fgx cerr<<"-------------"< pii; void dbg(){cerr<void dbg(A x,B... y){cerr<=1;i--) c[i]=(c[i+1]+inv[n-i])%mod,(sl+=c[i])%=mod; // for(rint i=y+2;i<=n;i++) c[i]=(c[i-1]+inv[i-1])%mod,(sr+=c[i])%=mod; if(x==y){cout<<"0\n";continue;} sl=gets(n-y+2,n-1),sr=gets(y+1,n-1); if(y==1||y==n) { if(x