只有70分,不会
#include<bits/stdc++.h>
using namespace std;
int n,a[1500005];
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
}
for(int i=1,j=2,k=0,o=1;i<=n;i++){
j=2;
k=0;
o=1;
while(o<a[i]){
o+=j;
j++;
k++;
}
if(o-a[i]<k)
cout<<0<<endl;
else
cout<<1<<endl;
}
return 0;
}