提交时间:2024-06-01 15:38:53

运行 ID: 150116

#include<bits/stdc++.h> using namespace std; bool flag(int n){ for(long long i=0;pow(2,i)<=n;i++){ for(long long j=0;pow(2,j)<=n;j++){ if(pow(2,i)+pow(2,j)==n) return true; } } return false; } int main(){ int n; cin >> n; for(int i=1;i<=n;i++){ int x; cin >> x; if(flag(x)){ cout << "yes\n"; }else{ cout << "no\n"; } } return 0; }