Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166591 | 账号已封禁@magicoj | 二进制半整数 | C++ | 运行超时 | 0 | 1000 MS | 248 KB | 566 | 2024-08-19 14:56:24 |
#include<bits/stdc++.h> using namespace std; long long int t,n,i=0,j=0,temp=1,temp2=0; int main(){ cin>>t; int tmp=0; for(int k=0;k<t;k++){ cin>>n; tmp=0; for(i=0;i+j<n;i++){ if(tmp==1){ break; } for(int j=0;i+j<n;j++){ temp=1; temp2=1; if(i!=0) for(int k=0;k<i;k++){ temp=temp*2; } if(j!=0) for(int k=0;k<j;k++){ temp2=temp2*2; } if(temp+temp2==n){ cout<<"yes"<<endl; tmp=1; break; } } } if(tmp==0){ cout<<"no"<<endl; } } }