提交时间:2024-08-19 17:09:21

运行 ID: 167657

#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(){ cin >> n; while(n--){ int x; cin >> x; int cx=lo(x); if(cx!=-1)cout << "Yes\n"; else cout << "No\n"; } return 0; }