提交时间:2024-07-18 22:06:15

运行 ID: 156953

#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(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; }