提交时间:2023-08-21 23:45:29
运行 ID: 99102
#include <bits/stdc++.h> #define ll long long using namespace std; int main(){ int n,a; cin>>n; for(ll i = 0;i<n;i++){ bool t = false; cin>>a; for(ll j = 0;pow(2,j)<a;j++){ ll cnt = a-pow(2,j); for(ll k = 0;pow(2,k)<=cnt;k++){ if(pow(2,k)==cnt){ cout<<"yes"<<endl; t = 1; break; } } if(t==1){ break; } } if(t==0){ cout<<"no"<<endl; } } return 0; }