#include <bits/stdc++.h>
using namespace std;
void testcase() {
int k; cin>>k;
++k;
int best = 0;
for(int i=1; i*i<=k; ++i) {
if(k % i == 0) {
best = i;
}
}
cout<<"-1\n";
for(int i=1; i<best; ++i) {
cout<<"0 ";
}
for(int i=1; i<k/best; ++i) {
cout<<"1 ";
}
cout<<'\n';
}
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int Z; cin>>Z;
while(Z--) {
testcase();
}
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... |