提交时间:2023-08-21 16:26:41
运行 ID: 99043
#include<bits/stdc++.h> #define int long long using namespace std; namespace Fast{ inline int fr(){ register int x = 0,f = 1; static char c = getchar(); while (c < '0' || c > '9'){ if (c == '-'){ f = -1; } c = getchar(); } while (c >= '0' && c <= '9'){ x = (x << 1) + (x << 3) + (c ^ 48); c = getchar(); } return x * f; } inline void fw(int x){ if (x < 0){ putchar('-'); x = -x; } if (x > 9){ fw(x / 10); } putchar(x % 10 + 48); } } using namespace Fast; int lowbit(int x){ return x & (-x); } void slove(){ int n = fr(); int x = lowbit(n); n -= x; if (lowbit(n) == n){ puts("yes"); } else{ puts("no"); } } signed main(){ int t = fr(); while (t--){ slove(); } return 0; }