提交时间:2023-08-21 22:42:21
运行 ID: 99083
#include <iostream> #include <cmath> using namespace std; int lp2(int x){ x |= (x >> 1); x |= (x >> 2); x |= (x >> 4); x |= (x >> 8); x |= (x >> 16); return (x & ~(x>>1)); } int main(){ int n,k; cin >> n; for(int i=0;i<n;i++){ cin >> k; if(x-lp2(x)-lp2(x-lp2(x))) cout << "yes\n"; else cout << "no\n"; } return 0; }