提交时间:2024-08-20 00:05:21

运行 ID: 168201

#include <iostream> int main() { using namespace std; int n; cin >> n; int vec[n]; if (n<1 && n> 1000) {return 1;} for (int i = 0; i < n; ++i) { cin >> vec[i]; } for (int i = 0; i < n; ++i) { if (vec[i] > 0 && (vec[i] & (vec[i] - 1)) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }