第五题做法可以到O(log(n)) ``` #include<bits/stdc++.h> using namespace std; int main(){ long long n,m,T; cin>>T; while(T--){ cin>>n>>m; ll dep=0,tmp=n; while(tmp){ tmp>>=1; dep++; } if(m>=dep){ cout<<"-1\n"; }else{ cout<<(n>>(dep-m))<<"\n"; } } return 0; } ```