提交时间:2024-06-02 21:04:54

运行 ID: 150359

#include <iostream> #include <set> using namespace std; typedef unsigned long long ull; set <ull> book; void add() { for(int i = 0; i <= 31; i++) for(int j = 0; j <= 31; j++) book.insert((1 << i) + (1 << j)); return ; } int main() { add(); int t; ull n; cin >> t; while(t--) { cin >> n; if(book.count(n) != 0) cout << "yes" << endl; else cout << "no" << endl; } return 0; }