#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define INF 1000000000 #define MOD 998244353 #define MAX 300000 int main(){ int N,Q; cin>>N>>Q; for(int q=0;q>S>>T; int ans=0; for(int i=0;i<=N;i++){ if(S%(1LL<<(i+1))!=0&&S+(1LL<=0;i--){ if(S%(1LL<