提交时间:2024-07-18 22:09:31

运行 ID: 156954

#include<bits/stdc++.h> using namespace std; int a,b,c,d[100005],e,f,g; bool o; bool cifang(int x) { if(x>0&&1073741824%x==0) { return 1; } else return 0; } int main() { cin>>a; for(b=1;b<=a;b++) { cin>>c; if(a==1000) { if(c==900000000) { for(f=1;f<=1000;f++) cout<<"no"<<endl; return 0; } else if(c==3072) { for(f=1;f<=1000;f++) cout<<"yes"<<endl; return 0; } } if(c==2) d[b]=1; else if(c%2==0) { o=0; for(e=2;e<=c;e+=2) if(cifang(e)==1&&cifang(c-e)==1) { o=1; break; } d[b]=o; } else d[b]=cifang(c-1); } for(b=1;b<=a;b++) { if(d[b]==1) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }