#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector > G(n); for(int i=1;i>x>>y; x--;y--; G[x].emplace_back(y); G[y].emplace_back(x); } vector dp(n,n); queue q; for(int i=0;i