This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long int lld;
int main(){
int T;
cin>>T;
while(T--){
int K;
cin>>K;
cout<<-1<<endl;
K++;
/*int arr[K];
for(int i=0;i<K;i++)cin>>arr[i];*/
int bit=0;
for(int i=2;i<=K;i++){
if(K%i==0){
while(K%i==0){//cout<<i<<endl;
for(int j=0;j<i-1;j++)cout<<bit<<" ";
bit=1-bit;
K/=i;
}
}
}
cout<<endl;
/*for(int msk=0;msk<(1<<K);msk++){
int arr[K];
for(int i=0;i<K;i++)arr[i]=((msk&(1<<i))>0);
lld DP[K];
lld ans=0;
for(int i=0;i<K;i++){
DP[i]=0;
bool b=true;
for(int j=i-1;j>-1;j--){
DP[i]+=DP[j];
if(arr[j]==arr[i]){b=false;
break;
}
}DP[i]+=b;
ans+=DP[i];
//cout<<DP[i]<<endl;
}cout<<ans<<" ";
for(int i=0;i<K;i++)cout<<arr[i];
cout<<endl;
}*/
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |