{ VI nodes[32]; map edges; set vis; ll@n,@st,@ed; nodes[__builtin_popcountl(st)].push_back(st); nodes[__builtin_popcountl(ed)].push_back(ed); rep(n){ ll@s; nodes[__builtin_popcountl(s)].push_back(s); } rep(i,31){ for(ll j:nodes[i]){ for(ll k:nodes[i+1]){ if(__builtin_popcount(j^k)==1){ edges[j].push_back(k); edges[k].push_back(j); } } } } int q[3000]; ll qr=0,qw=0,ans=0; q[qw++]=st; while(qr