提交时间:2024-08-19 17:17:02
运行 ID: 167737
#include<bits/stdc++.h> using namespace std; int n; vector<int>v; int lo(int x){ int cnt=0,z; while(x/=2){ cnt++; z=x; v.push_back(z); } if(v[v.size()-2]%2==1)return -1; return cnt; } int main(){ scanf("%d",&n); while(n--){ int x; scanf("%d",&x); int cx=lo(x); if(cx!=-1)cout << "Yes\n"; else cout << "No\n"; } return 0; }